API Integration

1. Overview

DaReactions 5.1.0 introduces read-only APIs, providing users with enhanced capabilities to interact with reactions and retrieve tailored content seamlessly. This knowledge base serves as your comprehensive guide to understanding and implementing these powerful features.

2. Available Endpoints

1. Get all Reactions

  • Endpoint: GET https://your-wordpress.site/da/v1/reactions/get-reactions/
  • Description: Retrieve a comprehensive list of all reactions, offering users diverse ways to express themselves.

2. Get Main Reaction for Content

  • Endpoint: GET https://your-wordpress.site/da/v1/reactions/get-main-reaction-for-content/{resource_type}/{resource_id}/
  • Parameters:
    • {resource_type} (string): Type of the resource.
    • {resource_id} (integer): ID of the resource.
  • Description: Discover the primary reaction associated with specific content, gaining insights into user engagement.

3. Get Reactions for Content

  • Endpoint: GET https://your-wordpress.site/da/v1/reactions/get-reactions-for-content/{resource_type}/{resource_id}/
  • Parameters:
    • {resource_type} (string): Type of the resource.
    • {resource_id} (integer): ID of the resource.
  • Description: Fetch a list of reactions tied to a particular content item, fostering community and user interaction.

4. Get Reactions and Users for Content

  • Endpoint: GET https://your-wordpress.site/da/v1/reactions/get-reactions-and-users-for-content/{resource_type}/{resource_id}/
  • Parameters:
    • {resource_type} (string): Type of the resource.
    • {resource_id} (integer): ID of the resource.
    • reaction_id (integer, optional): Filter for a specific type of reaction.
    • page_size (integer, optional): Number of reactions per page.
    • page_num (integer, optional): Page number.
  • Description: Dive deep into user engagement with reactions, allowing users to explore and interact with content more personally.