wnslib.services.registrations package

Submodules

wnslib.services.registrations.registrations module

class wnslib.services.registrations.registrations.wnsRegistrations(wnsEnviron)

Bases: wnslib.operation.wnsOperation

Class to manage user subscription to notification

user_id

int – user id

notification

int – notification id

check_data(data)

Method to check subscription

Check if a user can receive notification via mail or twitter

executeDelete()

DELETE subscription delete user from notification alert

executeGet()

GET registration

get user subscription to notifications

Returns:A dict containing all user subscription to notification. Example: {
user_id:[
{
“not_id”: 1, “not_list”: [
“email”, “twitter”

], “description”: “notification description”, “name”: “notification name”

}

]

}

executePost()

POST registrations

subscribe a user to a notification

Return confirm message if subscribed

executePut()

PUT registration

Update user subscription to notification

Module contents