Version 3 (modified by guest, 16 years ago) (diff) |
---|
LogIn
Sections
Intro
login given user, set interface language and initiate session
Description
struct LogIn(string $username, string $password, string $language, string $useragent)
Login user username identified by password password communicating in language language and working in client application useragent.
This function should be always called when starting communication with OSDb server to identify user, specify application and start a new session (either registered user or anonymous).
If user has no account, blank username and password should be used.
Parameters
- username
- nickname of user that's trying to login, can be left blank if logging in anonymously
- password
- user's password to verify identity, can be left blank if logging in anonymously
- language
- ISO639 2-letter language code to specify the language all subsequent communication should use (mainly for error messages).
- useragent (required)
- identifier of application/useragent that is trying to execute this operation, must be specified, empty parameter is not allowed
Return Values
Output is returned in this structure:
struct( (string) [token], (string) [status], (double) [seconds] )
and contains these elements:
- token
- token string/session id, must be used in subsequent communication
- status
- function result code, see list of status codes
- seconds
- time taken to execute this command on server
Implementations
Changelog
Version 1: created this function
Examples
Input
<methodCall> <methodName>LogIn</methodName> <params> <param> <value><string>eduo</string></value> </param> <param> <value><string>******</string></value> </param> <param> <value><string>en</string></value> </param> <param> <value><string>SolEol 0.0.8</string></value> </param> </params> </methodCall>
Output
<methodResponse> <params> <param> <value> <struct> <member> <name>token</name> <value><string>j5dkms7al7vivnrvaflbpf6634</string></value> </member> <member> <name>status</name> <value><string>200 OK</string></value> </member> <member> <name>seconds</name> <value><double>0.035</double></value> </member> </struct> </value> </param> </params> </methodResponse>
Notes
none yet
See also
Comments
add your comments, hints and suggestion here if you like ...