A MoogDb v2 method that returns the team IDs and team names for a user.
Back to MoogDb V2 API Method Reference.
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. |
Method getUserTeams
returns the following response:
Type | Description |
---|---|
CEvent | A CEvent object containing the team IDs and team names for the specified user. |
The following examples demonstrate typical use of method getUserTeams
:
Example request to return the details of user ID 6:
var cevent = moogdb.getUserTeams(6);
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"
}]