getUserTeams
A MoogDb v2 method that returns the team IDs and team names for a user.
Back to MoogDb V2 API Method Reference.
Request arguments
Method getUserTeams
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| Number | No, if you specify | A valid user ID. |
| String | No, if you specify | A valid username. |
Response
Method getUserTeams
returns the following response:
Type | Description |
---|---|
CEvent | A CEvent object containing the team IDs and team names for the specified user. |
Examples
The following examples demonstrate typical use of method getUserTeams
:
Request example
Example request to return the details of user ID 6:
var cevent = moogdb.getUserTeams(6);
Response example
Example response returning the team IDs and team names for user ID 6:
[{ "id": 2, "name": "Alpha" }, { "id": 3, "name": "Epsilon" }, { "id": 4, "name": "Delta" }]