-
Notifications
You must be signed in to change notification settings - Fork 0
Users
Kason Chan edited this page Jun 10, 2015
·
20 revisions
Users can be anyone or anything.
- Field guide
- Get a single user
- Get the authenticated user
- Get all users
- Update the authenticated user
Field | Type | Description |
---|---|---|
login |
String |
The user-defined login, handle, or alias that this user identifies themselves with. Logins are unique. Valid length range: 1 - 50. Example: "login": "playchat"
|
avatar_url |
String |
A HTTP-based URL pointing to the user’s avatar image. Nullable. Default to "" .Example: "avatar_url": ""
|
type |
String |
Identifies the user is admin or normal user. Default to user .Example: "type": "admin"
|
email |
String |
The email that this user identifies themselves with. Emails are unique. Valid format: ([a-zA-Z0-9._]+)@([a-zA-Z0-9._]+)(\.)([a-zA-Z0-9]+) .Example: "email": "[email protected]"
|
location |
String |
The user-defined location for this account’s profile. Not necessarily a location nor parseable. Nullable. Valid length range: 0 - 100. Example: "location": "playchat"
|
password |
String |
The used-defined password. Valid length range: 8 - 50. Example: "password": "HelloPlayChatters"
|
confirmed |
Boolean |
When true, indicates that the user has confirmed creating the login. Default to false .Example: "confirmed": true
|
created_at |
Long |
The system datetime that the user account was created on PlayChat. Example: "created_at": 1432441527583
|
updated_at |
Long |
The system datetime that the user account was updated on PlayChat. Example: "updated_at": 1432441527583
|
GET /users/:username
200 OK
{
"login": "playchat",
"avatar_url": "",
"type": "user",
"email": "[email protected]",
"location": "",
"confirmed": true,
"created_at": 1432441527583,
"updated_at": 1432441527583
}
You must pass authentication information with your request.
GET /user
200 OK
{
"login": "playchat",
"avatar_url": "",
"type": "user",
"email": "[email protected]",
"location": "",
"confirmed": true,
"created_at": 1432441527583,
"updated_at": 1432441527583
}
GET /users
200 OK
[ {
"login" : "playchat",
"avatar_url" : "",
"type" : "admin",
"email" : "[email protected]",
"location" : "",
"confirmed" : true,
"created_at" : 1432441527583,
"updated_at" : 1432441527583
} ]
You must pass authentication information with your request.
Field | Type | Description |
---|---|---|
location |
String |
The user-defined location for this account’s profile. Not necessarily a location nor parseable. Nullable. Valid length range: 0 - 100. Example: "location": "playchat"
|
PUT /user
{
"location": "playchat"
}
200 OK
{
"login": "playchat",
"avatar_url": "",
"type": "user",
"email": "[email protected]",
"location": "",
"confirmed": true,
"created_at": 1432441527583,
"updated_at": 1432441527583
}