|
Accessing phone numbers
|
phone_number | Get phone number details |
phone_type | get phone type |
replace | Replace all phone numbers bound to the given entity. (administrative) |
select | Get the phone numbers bound to the given entities. (administrative) |
services/phones/phone_number ¶
|
||||||
https://usosapps.demo.usos.edu.pl/services/phones/phone_number | ||||||
This is a BETA method. We're looking for beta-testers. Until we find them, there's a substantial probability it won't stay backwards-compatible! If you are planning on using this method, please let us know. Then, we will work with you and move it out of beta as soon as we can. Get phone number details | ||||||
phone_id | required | Identifier of a phone in database | ||||
fields | optional |
Default value: number|comment Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus optional standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus optional oauth_token for Token authorization. | ||||||
Returned value: A dictionary of selected fields and their values. Available fields:
|
services/phones/phone_type ¶
|
||||||
https://usosapps.demo.usos.edu.pl/services/phones/phone_type | ||||||
This is a BETA method. We're looking for beta-testers. Until we find them, there's a substantial probability it won't stay backwards-compatible! If you are planning on using this method, please let us know. Then, we will work with you and move it out of beta as soon as we can. get phone type | ||||||
id | required | Id of a type | ||||
fields | optional |
Default value: id|description Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
No additional OAuth arguments are required. If you provide any, they will be ignored. | ||||||
Returned value: A dictionary of selected fields and their values. Available fields:
|
services/phones/replace ¶
Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.
|
||||||
https://usosapps.demo.usos.edu.pl/services/phones/replace | ||||||
This is a BETA method. We're looking for beta-testers. Until we find them, there's a substantial probability it won't stay backwards-compatible! If you are planning on using this method, please let us know. Then, we will work with you and move it out of beta as soon as we can. Replace all phone numbers bound to the given entity. This is a simple method allowing you to edit phone numbers of various entities. It has a limited functionality, but is quite easy to implement and should be enough in most cases. If you need extended funtionality, please contact us. Unlike the select method, this method works with only a single entity. That is, if you want to change the numbers of two users, then you will have to call this method twice. The changes made by this method are atomic - if any of the numbers fails to be saved, then none of them will be saved (nor the previous set of numbers will be removed). Before each replace, it is advised to make the select call in order to make sure that your user sees the fresh content! | ||||||
data | required |
JSON-encoded list with the descriptions of all the numbers to be saved. The format of this list is very similar to the one described in the select method. Each entry on the list must be a dictionary, and:
Note, that there might be some additional and undocumented restrictions. For example, some special characters could not be accepted in the number field, or the length of the comment could not exceed certain length. If the provided data fails these restrictions, then the error response will contain an appropriate message for the user. |
||||
fac_id | optional |
Default value: (empty string) The ID of the faculty the numbers of which you want to edit. |
||||
user_id | optional |
Default value: (empty string) The ID of the user the numbers of which you want to edit. Note, that you can edit only personal phone numbers using this method. If you are looking for a way to edit official, work-related phone numbers of the staff members, then you should use the services/users/change method. |
||||
building_id | optional |
Default value: (empty string) The ID of the building the numbers of which you want to edit. |
||||
dorm_id | optional |
Default value: (empty string) The ID of the dormitory the numbers of which you want to edit. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required. | ||||||
Returned value: In case of success, HTTP 200 response with the In case of failure, use the user_messages field to display a proper message for the user. |
services/phones/select ¶
Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.
|
||||||
https://usosapps.demo.usos.edu.pl/services/phones/select | ||||||
This is a BETA method. We're looking for beta-testers. Until we find them, there's a substantial probability it won't stay backwards-compatible! If you are planning on using this method, please let us know. Then, we will work with you and move it out of beta as soon as we can. Get the phone numbers bound to the given entities. You can retrieve the phone numbers of multiple entities at the same
time, but all of these entities must be of the same class. So,
for example, if you want to get the numbers of faculties X and Y, and
of the user Z, then you must call this method twice - once with the
Note, that although all the parameters are optional, you still must use at least one of them in order to get the results. The IDs of the entities are not validated (empty lists will be returned for non-existing entities). | ||||||
fields | optional |
Default value: number|comment Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section. |
||||
fac_ids | optional |
Default value: (empty string) List of faculty IDs. |
||||
user_ids | optional |
Default value: (empty string) List of user IDs. Note, that this method will return only personal phone numbers of these users. If you are looking for offical, work-related phone numbers of staff members, then you should use the phone_numbers field of the services/users/user method. |
||||
building_ids | optional |
Default value: (empty string) List of building IDs. |
||||
dorm_ids | optional |
Default value: (empty string) List of dormitory IDs. |
||||
format | optional |
Default value: json Format in which to return values. See supported output formats. |
||||
callback | optional |
Required only if you've chosen jsonp as a return format. |
||||
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required. | ||||||
Returned value: A dictionary with all the entity IDs mapped to its keys. For every key, its value will contain the (unordered) list of phone numbers associated with the entity by this ID. Each phone number will be represented as a dictionary of the following structure:
|