|
Events
|
notifier_status | Get information on the status of the notifier. |
register_fcm_token | Register instance ID. |
registered_fcm_tokens | List your (user) registered FCM instances. |
subscribe_event | Subscribe for event notifications. |
subscriptions | Lists your (the consumer) subscriptions. |
test_my_fcm | Send a notification to your FCM instances |
unsubscribe | Unsubscribe from event notifications. |
services/events/notifier_status ¶
|
||||||
https://www.usosapi.amuz.bydgoszcz.pl/services/events/notifier_status | ||||||
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 information on the status of the notifier. | ||||||
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 the following structure:
|
services/events/register_fcm_token ¶
|
||||||
https://www.usosapi.amuz.bydgoszcz.pl/services/events/register_fcm_token | ||||||
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. Register Firebase token for receiving events. When a new event happens to user who called this method, USOS API will send message to all FCM instances the user registered. | ||||||
fcm_registration_token | required | Firebase Cloud Messaging client token | ||||
instance_id | optional |
ID of the FCM instance. If there exists instance tied to the user with this ID, it will be replaced. You can use this field to avoid situation, when one device registers the same FCM token twice, so it receives each message twice. If you don't specify this field, a new FCM instance with no ID will be created. |
||||
instance_name | optional | User-readable name of the instance. | ||||
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. Plus required oauth_token for Token authorization. | ||||||
Returned value: Empty dictionary. |
services/events/registered_fcm_tokens ¶
|
||||||
https://www.usosapi.amuz.bydgoszcz.pl/services/events/registered_fcm_tokens | ||||||
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.
List your (user) registered FCM instances.
| ||||||
fields | optional |
Default value: instance_id|instance_name|fcm_registration_token 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 required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus required oauth_token for Token authorization. | ||||||
Returned value: A list of registered FCM instances - dictionaries with the selected fields and their values. Available fields include:
|
services/events/subscribe_event ¶
|
||||||
https://www.usosapi.amuz.bydgoszcz.pl/services/events/subscribe_event | ||||||
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. Subscribe for event notifications of a certain type. This method should be called only once (per Consumer, per event type). Refer to the module's documentation for detailed explanation of the entire subscription and notification-sending flow. | ||||||
event_type | required |
The type of event notification that you want to subscribe for. Possible values: crstests/user_grade, crstests/user_point, grades/grade. |
||||
callback_url | required | The URL of your server. The notifications will be sent to this URL as events occur. | ||||
verify_token | optional | The string that will be passed as an additional query parameter to your URL during the verification. | ||||
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 of the following structure:
| ||||||
Thrown errors:
|
services/events/subscriptions ¶
|
||||||
https://www.usosapi.amuz.bydgoszcz.pl/services/events/subscriptions | ||||||
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. Lists your (the consumer) subscriptions. | ||||||
fields | optional |
Default value: id|event_type|callback_url 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 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 list of subscription objects - dictionaries with the selected fields and their values. Available fields include:
|
services/events/test_my_fcm ¶
|
||||||
https://www.usosapi.amuz.bydgoszcz.pl/services/events/test_my_fcm | ||||||
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.
Test your FCM instances by sending a notification with supplied message. The notification payload will be
consistent with a real notification.
| ||||||
message | required | A message payload to send in the notification | ||||
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. Plus required oauth_token for Token authorization. | ||||||
Returned value: An empty dictionary. |
services/events/unsubscribe ¶
|
||||||
https://www.usosapi.amuz.bydgoszcz.pl/services/events/unsubscribe | ||||||
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. Unsubscribe from previously subscribed event notifications. The parameters you pass to this method form a filter. This filter will be used to search your (the Consumer's) subscriptions. The ones that match the filter will be deleted. | ||||||
id | optional | The ID of a subscription. | ||||
event_type | optional | The event type of a subscription. | ||||
callback_url | optional | The callback URL of a subscription. | ||||
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: Empty dictionary. | ||||||
Thrown errors:
|