HumHub icon

HumHub

Consume HumHub API (v.0.1.8)

Actions126

Overview

This node operation retrieves all 'Like' records associated with a specific model and primary key in the HumHub platform. It supports fetching either all likes or a limited subset based on pagination parameters. This is useful for scenarios where you want to analyze or display all likes related to a particular content object, such as posts or comments, within HumHub.

Use Case Examples

  1. Retrieve all likes for a specific post model and primary key to display the total number of likes on that post.
  2. Fetch a limited number of likes with pagination to show recent likes on a comment without overwhelming the interface.

Properties

Name Meaning
Authentication Method of authentication to use for the API request, either Basic Auth or JWT Token.
Model The model record class representing the object to get likes for, e.g., humhub\\modules\\post\\models\\Post.
Primary Key The primary key of the record to get likes for.
Return All Whether to return all results or limit the number of results.
Query Parameters Additional query parameters for pagination when not returning all results, including limit and page number.

Output

JSON

  • results - Array of like records returned from the HumHub API for the specified model and primary key.

Dependencies

  • HumHub API

Troubleshooting

  • Ensure the 'model' parameter is correctly formatted with double backslashes as required by HumHub API.
  • If the node returns an error about missing binary data, verify that the input items contain the expected data structure.
  • Pagination parameters 'limit' and 'page' must be within allowed ranges; otherwise, the API may reject the request.

Links

  • HumHub API Documentation - Official API documentation for HumHub, useful for understanding available endpoints and parameters.

Discussion