API Integration

DaReactions 5.1.0 introduces a series of read-only APIs that enable enhanced interaction capabilities with reactions and allow for the retrieval of tailored content seamlessly. This section serves as a comprehensive guide to understanding and implementing these powerful features.

1. Overview

The introduction of APIs in DaReactions 5.1.0 offers developers and site administrators the ability to integrate reaction data into third-party applications, analytics tools, and custom workflows, enhancing the flexibility and usability of the reactions data.

2. Available Endpoints

The following endpoints are available to interact with the reactions data programmatically:

a. Get All Reactions

  • Endpoint: GET https://your-wordpress.site/da/v1/reactions/get-reactions/
  • Description: This endpoint retrieves a comprehensive list of all reactions available, providing diverse ways for users to express their emotions and thoughts on content.

b. 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): The type of the content.
    • {resource_id} (integer): The identifier for the content.
  • Description: Fetch the primary reaction associated with a specific piece of content, offering insights into the most significant user engagement.

c. 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): The type of the content.
    • {resource_id} (integer): The identifier for the content.
  • Description: Retrieve a detailed list of reactions specific to a content item, enhancing understanding of how users interact with the content.

d. 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): The type of the content.
    • {resource_id} (integer): The identifier for the content.
    • reaction_id (integer, optional): A specific type of reaction to filter by.
    • page_size (integer, optional): The number of reactions per page.
    • page_num (integer, optional): The page number for pagination.
  • Description: This endpoint allows a deep dive into user interactions with specific reactions, providing a more personalized way to engage and understand audience behavior.

Implementation and Usage

To utilize these endpoints effectively, developers should integrate them into their applications or websites using standard HTTP request methods. It is recommended to secure access to these endpoints to protect reaction data and ensure that only authorized personnel can retrieve sensitive user interaction information.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us