API: Users
The Users API methods allow for retrieving information about user accounts.
Attributes
Public (always available)
- id - identifier - A unique identifier for the given user. This will never change.
- username - string - The user's username. Note: The user can change this value.
- avatar_image_url - string - The URL of the user's avatar image.
- profile_url - string - The URL of the user's profile on Obsidian Portal.
- campaigns - campaign mini-object An array of the user's campaigns
- is_ascendant - boolean - Indicates if the user is an Ascendant member.
- last_seen_at - timestamp - The last time the user was active on the website. ISO-8601 timestamp.
- utc_offset - string - Formatted string representing the user's time zone. It is formatted as "+HH:MM" and represents the offset from UTC. Example: "-05:00" is Eastern US time.
- locale - string - ISO 639-1 language code for the user's preferred language.
- created_at - timestamp - Indicates when the user first created their account. ISO-8601 timestamp.
- updated_at - timestamp - Indicates when the user first created their account. ISO-8601 timestamp.
Methods
Show Me
URL: http://api.obsidianportal.com/v1/users/me.format
HTTP Verb: GET
Requires Authentication: Yes
Required Parameters: None
Optional Parameters: None
Response: The currently logged in user.
Example
Request
http://api.obsidianportal.com/v1/users/me.json
Response
{
'id' : '43ae2d98f20111df8ad4d49a20038434',
'username' : 'Micah',
'avatar_image_url' : 'http://cdn.obsidianportal.com/images/297821/my_face.jpg',
'profile_url' : 'http://www.obsidianportal.com/profile/Micah',
'created_at' : '2007-02-20T09:55:10Z',
'is_ascendant' : true,
'last_seen_at' : '2010-11-25T12:55:28Z',
'utc_offset' : '-05:00',
'locale' : 'en',
'campaigns' : [
{
'id' : '459a902ef20111df8ad4d49a20038434',
'name' : 'Kensing',
'campaign_url' : 'http://www.obsidianportal.com/campaigns/kensing'
'visibility' : 'public',
'role' : 'game_master'
},
{
'id' : '453d0788f20111df8ad4d49a20038434',
'name' : 'Arkanopolis',
'campaign_url' : 'http://www.obsidianportal.com/campaigns/arkanopolis'
'visibility' : 'public',
'role' : 'player'
}
]
}
Show
URL: http://api.obsidianportal.com/v1/users/id.format
HTTP Verb: GET
Requires Authentication: Yes
Required Parameters:
- id - identifier - The id (or username, see use_username) of the user to request
Optional Parameters:
- use_username - boolean - Indicates that the passed id is actually a username and to look up the user by username.
Response: A single user.
Example
Request
http://api.obsidianportal.com/v1/users/43ae2d98f20111df8ad4d49a20038434.json
Response
{
'id' : '43ae2d98f20111df8ad4d49a20038434',
'username' : 'Micah',
'avatar_image_url' : 'http://cdn.obsidianportal.com/images/297821/my_face.jpg',
'profile_url' : 'http://www.obsidianportal.com/profile/Micah',
'campaigns' : [
{
'id' : '459a902ef20111df8ad4d49a20038434',
'name' : 'Kensing',
'campaign_url' : 'http://www.obsidianportal.com/campaigns/kensing'
'visibility' : 'public',
'role' : 'game_master'
},
{
'id' : '453d0788f20111df8ad4d49a20038434',
'name' : 'Arkanopolis',
'campaign_url' : 'http://www.obsidianportal.com/campaigns/arkanopolis'
'visibility' : 'public',
'role' : 'player'
}
]
}