Group¶
An individual group represented in the Graph API.
Test this object with the API Explorer
To read a group, perform an HTTP GET request on https://api.dailymotion.com/group/GROUP_ID. By default, only a small number of fields are returned. To request specific fields, pass the list of wanted fields in the fields query-string parameter (ex: https://api.dailymotion.com/group/GROUP_ID?fields=field1,field2,...).
Global API Parameters¶
The following parameters are valid globally on the API:
- localization – Change the default localization of the user. This will affect results language and content selection.
Note that changing the localization won’t give access to geoblocked content of the defined localization. The IP of the API consumer is always used for this kind of restriction. You can use a standard locale like fr_FR, en_US or simply en, it.
- family_filter – Enable/disable the family filter. By default, the family filter is on. Changing this parameter will filter-out
explit content from searches and global contexts. You should always check the explicit field when applicable as some contexts may return those contents. You should then flag those content in your UI to warn the user about the nature of the content.
Fields¶
| Name | Description | Permissions | Format |
|---|---|---|---|
| created_time | The date when the group has been created | No access_token required for reading. | Returns date. |
| description | The group’s description | No access_token required for reading. This field is writable. | Returns string, min size: 1, max size: 2000. |
| filters | A list of filters availbe to reduce the result set. | This field can be used as filter but can’t be read nor written. | Returns array, allowed values: featured. |
| id | The group object ID | No access_token required for reading. | Returns the object id. |
| name | The Group’s name | No access_token required for reading. This field is writable. | Returns string, min size: 1, max size: 50. |
| owner | The group’s owner | No access_token required for reading. | Return a user. You can request sub-fields by using owner.<sub-field> notation. |
| search | Full text search | This field can be used as filter but can’t be read nor written. | Returns string, min size: 1, max size: 150. |
| sort | Change result ordering | This field can be used as filter but can’t be read nor written. | Returns string, allowed values: recent, relevance, active. |
| url_name | The globally unique group name to be used in URL (only alphanum + “-” and “_” letters are allowed) | No access_token required for reading. This field is writable. | Returns string, min size: 1, max size: 35. |
Connections¶
| Name | Description | Permissions | Returns |
|---|---|---|---|
| members | No access_token required for reading. manage_groups scope required for writing. | A list of User. | |
| videos | The videos associated to this group | No access_token required for reading. manage_groups scope required for writing. | A list of Video. |
The members connection¶
Read¶
You can read the list of a group‘s members by issuing an HTTP GET to /group/GROUP_ID/members. You can requests the list of user‘s fields to be returned using the fields parameter.
Test with the API Explorer
You can also see if a group has a member by issuing an HTTP GET to /group/GROUP_ID/members/USER_ID. This will return a list containing only the user if connected or an empty list otherwise.
Create¶
You can add a member by issuing an HTTP POST request to /group/GROUP_ID/members/USER_ID.
Test with the API Explorer
Delete¶
You can remove a member by issuing an HTTP DELETE request to /group/GROUP_ID/members/USER_ID.
Test with the API Explorer
The videos connection¶
Read¶
You can read the list of a group‘s videos by issuing an HTTP GET to /group/GROUP_ID/videos. You can requests the list of video‘s fields to be returned using the fields parameter.
Test with the API Explorer
You can also see if a group has a video by issuing an HTTP GET to /group/GROUP_ID/videos/VIDEO_ID. This will return a list containing only the video if connected or an empty list otherwise.
Create¶
You can add a video by issuing an HTTP POST request to /group/GROUP_ID/videos/VIDEO_ID.
Test with the API Explorer
Delete¶
You can remove a video by issuing an HTTP DELETE request to /group/GROUP_ID/videos/VIDEO_ID.
Test with the API Explorer