memberships resource endpoint
URL: /users/<id>/memberships.<format>
Supported Methods
| GET | Get a list of relationships that the selected user has with groups. |
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 that the selected user has with groups.
$tp->users->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 an Admin type that the selected user has with groups. |
| by-group | Get a list containing only the relationship between the selected user and a particular group, or an empty list if the user has no relationship with the group. |
| member | Get a list of relationships that have a Member type that the selected user has with groups. |
Example Request
GET /users/6p012877b13de7970c/memberships.json?max-results=4 HTTP/1.1
Host: api.typepad.com
HTTP/1.0 200 OK
Content-type: application/json
Content-length: 45
{
"entries": [],
"totalResults": 0
}