memberships resource endpoint
URL: /groups/<id>/memberships.<format>
Supported Methods
| GET | Get a list of relationships between users and the selected group. |
Query String Arguments
- start-index
- Index of the first item to return. The first item in the list has index 1.
- max-results
- Maximum number of items to return in the list response.
Resource Type
This endpoint returns an object of type List<Relationship>.
- entries (array<Relationship>)
- The items within the selected range.
- totalResults (integer)
- The total number of items in the whole list of which this object is a chunk.
Client Library Methods for PHP
- Get a list of relationships between users and the selected group.
$tp->groups->getMemberships(array( # Required Parameters "id" => $id, # Optional Parameters "limit" => $limit, "offset" => $offset, ))
Filter Endpoints
The following endpoints provide filtered views of this collection:
| admin | Get a list of relationships that have the Admin type between users and the selected group. |
| member | Get a list of relationships that have the Member type between users and the selected group. |
| blocked | Get a list of relationships that have the Blocked type between users and the selected groups. (Restricted to group admin.) |
Example Request
GET /groups/6p012877b14c77970c/memberships.json?max-results=4 HTTP/1.1
Host: api.typepad.com
HTTP/1.0 200 OK
Content-type: application/json
Content-length: 1792
{
"entries": [
{
"source": {
"urlId": "6p012877b14c77970c",
"objectType": "Group",
"objectTypes": [
"tag:api.typepad.com,2009:Group"
],
"id": "tag:api.typepad.com,2009:6p012877b14c77970c",
"siteUrl": "http://devin.example.com/",
"displayName": "Devin's Awesome Site"
},
"created": {
"tag:api.typepad.com,2009:Member": "2010-02-18T00:14:14Z",
"tag:api.typepad.com,2009:Admin": "2010-02-18T00:14:14Z"
},
"urlId": "6r012877b14c77970c0120a8ae8949970b",
"target": {
"urlId": "6p0120a8ae8949970b",
"location": null,
"interests": [],
"objectTypes": [
"tag:api.typepad.com,2009:User"
],
"profilePageUrl": "http://profile.typepad.com/matkinsdevin",
"aboutMe": null,
"objectType": "User",
"preferredUsername": "matkinsdevin",
"id": "tag:api.typepad.com,2009:6p0120a8ae8949970b",
"avatarLink": {
"width": 250,
"urlTemplate": "http://static.typepad.com/.shared:vf3abf28:typepad:en_us/default-userpics/08-{spec}.gif",
"url": "http://static.typepad.com/.shared:vf3abf28:typepad:en_us/default-userpics/08-250si.gif",
"height": 250
},
"displayName": "Devin Jineer"
},
"status": {
"types": [
"tag:api.typepad.com,2009:Admin",
"tag:api.typepad.com,2009:Member"
]
},
"id": "tag:api.typepad.com,2009:6r012877b14c77970c0120a8ae8949970b"
}
],
"totalResults": 1
}