Skip to main content

Activity Feed Management

Getting Started

In this section, we will show you how to manage your activity feeds.

Prerequisites

  1. Busy Hour Account (Sign Up if you don't have one yet)
  2. Create a Busy Hour Project from the Dashboard/Projects
  3. Create a Busy Hour App from from the Dashboard/Apps
  4. Download Busy Hour App config file from from the Dashboard/Apps

Activity Feed Management

To start creating your activity feed, updating your activity feed, and deleting your activity feed, you can use the useFeed hooks from @busy-hour/react package. The hook itself will return the following objects:

PropertyTypeDescription
createFunctionThe function to create activity feed
updateFunctionThe function to update activity feed
listFunctionThe function to list activity feed
findFunctionThe function to find activity feed
deleteFunctionThe function to delete activity feed

Creating Feed

To create your activity feed, you can use the create function. The function itself take the following properties:

PropertyTypeDescription
versionnumberThe The version of your activity feed
titlestring (optional)The title of your activity feed
descriptionstring (optional)The description of your activity feed
attachmentsarray (optional)The attachments of your activity feed
customobjectThe custom data for your activity feed
typestringThe type of your activity feed, useful for sending different types of activity feed

Updating Feed

To update your activity feed, you can use the update function. The function itself take the following properties:

PropertyTypeDescription
versionnumberThe The version of your activity feed
feedIdstringThe id of your activity feed you want to update
titlestring (optional)The title of your activity feed
descriptionstring (optional)The description of your activity feed
attachmentsarray (optional)The attachments of your activity feed
customobjectThe custom data for your activity feed
typestringThe type of your activity feed, useful for sending different types of activity feed

Listing Feeds

To list your activity feeds, you can use the list function. The function itself take the following properties:

PropertyTypeDescription
versionnumberThe The version of your activity feed
limitnumber (optional)Total number of activity feed to retrieve, (default: 10)
pagenumber (optional)The page number of activity feed to retrieve, (default: 1)
userIdstring (optional)The user id of your activity feed you want to list

Finding Feed

To find your activity feed, you can use the find function. The function itself take the following properties:

PropertyTypeDescription
versionnumberThe The version of your activity feed
feedIdstringThe id of your activity feed you want to find

Deleting Feed

To delete your activity feed, you can use the delete function. The function itself take the following properties:

PropertyTypeDescription
versionnumberThe The version of your activity feed
feedIdstringThe id of your activity feed you want to delete

Quick Example

src/main.tsx
import React from 'react';
import { useFeed } from '@busy-hour/react';

export default function Main() {
const manager = useFeed();

// ...rest of your code
}