activities
This endpoint is used to get BuddyPress activities. There are many optional parameters available to filter activities results. please check following examples for usage:
App wide Activities
http://localhost/api/userplus/activities/?key=KEY-HERE
Search terms within App wide Activities
http://localhost/api/userplus/activities/?key=KEY-HERE&search_terms=Testing
Search terms within User Activities
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1&search_terms=Testing
User Activities
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1
User Activities in Groups
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1&scope=groups
User Mentioned in Activity
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1&scope=mentions
User Favorites in Activity
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1&scope=favorites
User Activity by Action Type
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1&type=new_forum_post
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1&type=friendship_created
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1&type=joined_group
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1&type=created_group
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1&type=new_forum_topic
http://localhost/api/userplus/activities/?key=KEY-HERE&user_id=1&type=activity_update
Resource URL
http://localhost/api/userplus/activities/
Method
Required Parameters
- key – get API key from Settings > User Plus
Optional Parameters
- user_id – filter activity feed by user. Default: false
- type – filter activity feed by type, possible types: new_forum_post, new_blog_comment, new_blog_post, friendship_created, joined_group, created_group,
- new_forum_topic, activity_update, rtmedia_update. Default: false
- comments – whether or not to display comments along with activity items. Possible values: true, false. Default: true
- include – pass an activity_id or string of comma separated ids to show only these entries. Default: false
- sort – Sort the stream chronologically ascending or descending. Possible values: ASC, DESC. Default DESC.
- limit – Number of activity items to show per page. Default is 10.
- page - Which page to return based on the number limit value. Default= 1.
- search_terms – search activities for any given term
- scope: pre-defined filtering of the activity stream. Show only activity for the scope you pass for user_id. ‘user_id’ must be provided for ‘scope’ call. Accepted
- arguments: just-me, friends, groups, favorites, mentions. default value: just-me
- primary_id: The ID to filter on for a specific object. For example if you used groups as the object you could pass a group_id as the primary_id and restrict to that
- group. Possible arguments: Any specific object ID. Default value: false (no filter)
- secondary_id: The secondary ID to filter on for a specific object. For example if you used blogs as the object you could pass a blog_id as the primary_id and a
- post_id as the secondary_id the list all comments for that post usingnew_blog_comment as the action. Possible arguments: Any specific object ID. Default value: false (no filter)
- component - The object type to filter on (can be any active component ID as well as custom component ID’s) Example arguments: groups, friends, profile, status, blogs. Default value: false (no filter)
Sample Request URL
http://localhost/api/userplus/activities/?key=KEY-HERE
Related Endpoints
- activities_add_user_favorite
- activities_clear_new_mentions
- activities_delete_activity
- activities_delete_comment
- activities_find_mentions
- activities_get_user_favorites
- activities_get_user_mentionname
- activities_get_userid_from_mentionname
- activities_new_comment
- activities_post_update
- activities_remove_user_favorite
- activities_total_favorites_for_user