Method for fetching permissions from pubnub servers.
This method provides a mechanism to reveal existing PubNub Access Manager attributes for any combination of subscribe_key, channel and auth_key.
Returns a dict in sync mode i.e. when callback argument is not given The dict returned contains values with keys ‘message’ and ‘payload’
Sample Response {
“message”:”Success”, “payload”:{
- “channels”:{
- “my_channel”:{
- “auths”:{“my_ro_authkey”:{“r”:1,”w”:0}, “my_rw_authkey”:{“r”:0,”w”:1}, “my_admin_authkey”:{“r”:1,”w”:1}
}
}
},
}
Usage:
pubnub.audit (‘my_channel’); # Sync Mode
Method for decrypting data.
This method takes ciphertext as input and returns decrypted data. This need not be called directly as enncryption/decryption is taken care of transparently by Pubnub class if cipher key is provided at time of initializing pubnub object
Method for encrypting data.
This method takes plaintext as input and returns encrypted data. This need not be called directly as enncryption/decryption is taken care of transparently by Pubnub class if cipher key is provided at time of initializing pubnub object
Method for granting permissions.
This function establishes subscribe and/or write permissions for PubNub Access Manager (PAM) by setting the read or write attribute to true. A grant with read or write set to false (or not included) will revoke any previous grants with read or write set to true.
Returns a dict in sync mode i.e. when callback argument is not given The dict returned contains values with keys ‘message’ and ‘payload’
Sample Response: {
“message”:”Success”, “payload”:{
“ttl”:5, “auths”:{
“my_ro_authkey”:{“r”:1,”w”:0}}, “subscribe_key”:”my_subkey”, “level”:”user”, “channel”:”my_channel”
}
}
Get here now data.
You can obtain information about the current state of a channel including a list of unique user-ids currently subscribed to the channel and the total occupancy count of the channel by calling the here_now() function in your application.
Sync Mode: list Async Mode: None
Response Format:
The here_now() method returns a list of uuid s currently subscribed to the channel.
uuids:[“String”,”String”, ... ,”String”] - List of UUIDs currently subscribed to the channel.
occupancy: Number - Total current occupancy of the channel.
Example Response: {
occupancy: 4, uuids: [
‘123123234t234f34fq3dq’, ‘143r34f34t34fq34q34q3’, ‘23f34d3f4rq34r34rq23q’, ‘w34tcw45t45tcw435tww3’,]
}
This method fetches historical messages of a channel.
PubNub Storage/Playback Service provides real-time access to an unlimited history for all messages published to PubNub. Stored messages are replicated across multiple availability zones in several geographical data center locations. Stored messages can be encrypted with AES-256 message encryption ensuring that they are not readable while stored on PubNub’s network.
It is possible to control how messages are returned and in what order, for example you can:
Return messages in the order newest to oldest (default behavior).
Return messages in the order oldest to newest by setting reverse to true.
Page through results by providing a start or end time token.
Retrieve a “slice” of the time line by providing both a start and end time token.
Limit the number of messages to a specific quantity using the count parameter.
Returns a list in sync mode i.e. when callback argument is not given
Subscribe to presence data on a channel.
Only works in async mode
channel: Channel name ( string ) on which to publish message callback: A callback method should be passed to the method.
If set, the api works in async mode. Required argument when working with twisted or tornado .
Publishes data on a channel.
The publish() method is used to send a message to all subscribers of a channel. To publish a message you must first specify a valid publish_key at initialization. A successfully published message is replicated across the PubNub Real-Time Network and sent simultaneously to all subscribed clients on a channel.
Messages in transit can be secured from potential eavesdroppers with SSL/TLS by
setting ssl to True during initialization.
Published messages can also be encrypted with AES-256 simply by specifying a cipher_key during initialization.
Sync Mode : list Async Mode : None
The function returns the following formatted response:
[ Number, “Status”, “Time Token”]
The output below demonstrates the response to a successful call:
[1,”Sent”,”13769558699541401”]
Method for revoking permissions.
Returns a dict in sync mode i.e. when callback argument is not given The dict returned contains values with keys ‘message’ and ‘payload’
Sample Response: {
“message”:”Success”, “payload”:{
“ttl”:5, “auths”:{
“my_authkey”:{“r”:0,”w”:0}}, “subscribe_key”:”my_subkey”, “level”:”user”, “channel”:”my_channel”
}
}
Subscribe to data on a channel.
This function causes the client to create an open TCP socket to the PubNub Real-Time Network and begin listening for messages on a specified channel. To subscribe to a channel the client must send the appropriate subscribe_key at initialization.
Only works in async mode
This function will return a 17 digit precision Unix epoch.
Args:
- callback: (optional)
- A callback method should be passed to the method. If set, the api works in async mode. Required argument when working with twisted or tornado .
Returns a 17 digit number in sync mode i.e. when callback argument is not given
channel: Channel name ( string ) on which to publish message message: Message to be published ( String / int / double / dict / list ). callback: A callback method should be passed to the method.
If set, the api works in async mode. Required argument when working with twisted or tornado .
Method for fetching permissions from pubnub servers.
This method provides a mechanism to reveal existing PubNub Access Manager attributes for any combination of subscribe_key, channel and auth_key.
Returns a dict in sync mode i.e. when callback argument is not given The dict returned contains values with keys ‘message’ and ‘payload’
Sample Response {
“message”:”Success”, “payload”:{
- “channels”:{
- “my_channel”:{
- “auths”:{“my_ro_authkey”:{“r”:1,”w”:0}, “my_rw_authkey”:{“r”:0,”w”:1}, “my_admin_authkey”:{“r”:1,”w”:1}
}
}
},
}
Usage:
pubnub.audit (‘my_channel’); # Sync Mode
Method for decrypting data.
This method takes ciphertext as input and returns decrypted data. This need not be called directly as enncryption/decryption is taken care of transparently by Pubnub class if cipher key is provided at time of initializing pubnub object
Method for encrypting data.
This method takes plaintext as input and returns encrypted data. This need not be called directly as enncryption/decryption is taken care of transparently by Pubnub class if cipher key is provided at time of initializing pubnub object
Method for granting permissions.
This function establishes subscribe and/or write permissions for PubNub Access Manager (PAM) by setting the read or write attribute to true. A grant with read or write set to false (or not included) will revoke any previous grants with read or write set to true.
Returns a dict in sync mode i.e. when callback argument is not given The dict returned contains values with keys ‘message’ and ‘payload’
Sample Response: {
“message”:”Success”, “payload”:{
“ttl”:5, “auths”:{
“my_ro_authkey”:{“r”:1,”w”:0}}, “subscribe_key”:”my_subkey”, “level”:”user”, “channel”:”my_channel”
}
}
Get here now data.
You can obtain information about the current state of a channel including a list of unique user-ids currently subscribed to the channel and the total occupancy count of the channel by calling the here_now() function in your application.
Sync Mode: list Async Mode: None
Response Format:
The here_now() method returns a list of uuid s currently subscribed to the channel.
uuids:[“String”,”String”, ... ,”String”] - List of UUIDs currently subscribed to the channel.
occupancy: Number - Total current occupancy of the channel.
Example Response: {
occupancy: 4, uuids: [
‘123123234t234f34fq3dq’, ‘143r34f34t34fq34q34q3’, ‘23f34d3f4rq34r34rq23q’, ‘w34tcw45t45tcw435tww3’,]
}
This method fetches historical messages of a channel.
PubNub Storage/Playback Service provides real-time access to an unlimited history for all messages published to PubNub. Stored messages are replicated across multiple availability zones in several geographical data center locations. Stored messages can be encrypted with AES-256 message encryption ensuring that they are not readable while stored on PubNub’s network.
It is possible to control how messages are returned and in what order, for example you can:
Return messages in the order newest to oldest (default behavior).
Return messages in the order oldest to newest by setting reverse to true.
Page through results by providing a start or end time token.
Retrieve a “slice” of the time line by providing both a start and end time token.
Limit the number of messages to a specific quantity using the count parameter.
Returns a list in sync mode i.e. when callback argument is not given
Subscribe to presence data on a channel.
Only works in async mode
channel: Channel name ( string ) on which to publish message callback: A callback method should be passed to the method.
If set, the api works in async mode. Required argument when working with twisted or tornado .
Publishes data on a channel.
The publish() method is used to send a message to all subscribers of a channel. To publish a message you must first specify a valid publish_key at initialization. A successfully published message is replicated across the PubNub Real-Time Network and sent simultaneously to all subscribed clients on a channel.
Messages in transit can be secured from potential eavesdroppers with SSL/TLS by
setting ssl to True during initialization.
Published messages can also be encrypted with AES-256 simply by specifying a cipher_key during initialization.
Sync Mode : list Async Mode : None
The function returns the following formatted response:
[ Number, “Status”, “Time Token”]
The output below demonstrates the response to a successful call:
[1,”Sent”,”13769558699541401”]
Method for revoking permissions.
Returns a dict in sync mode i.e. when callback argument is not given The dict returned contains values with keys ‘message’ and ‘payload’
Sample Response: {
“message”:”Success”, “payload”:{
“ttl”:5, “auths”:{
“my_authkey”:{“r”:0,”w”:0}}, “subscribe_key”:”my_subkey”, “level”:”user”, “channel”:”my_channel”
}
}
Subscribe to data on a channel.
This function causes the client to create an open TCP socket to the PubNub Real-Time Network and begin listening for messages on a specified channel. To subscribe to a channel the client must send the appropriate subscribe_key at initialization.
Only works in async mode
This function will return a 17 digit precision Unix epoch.
Args:
- callback: (optional)
- A callback method should be passed to the method. If set, the api works in async mode. Required argument when working with twisted or tornado .
Returns a 17 digit number in sync mode i.e. when callback argument is not given
channel: Channel name ( string ) on which to publish message message: Message to be published ( String / int / double / dict / list ). callback: A callback method should be passed to the method.
If set, the api works in async mode. Required argument when working with twisted or tornado .
Method for fetching permissions from pubnub servers.
This method provides a mechanism to reveal existing PubNub Access Manager attributes for any combination of subscribe_key, channel and auth_key.
Returns a dict in sync mode i.e. when callback argument is not given The dict returned contains values with keys ‘message’ and ‘payload’
Sample Response {
“message”:”Success”, “payload”:{
- “channels”:{
- “my_channel”:{
- “auths”:{“my_ro_authkey”:{“r”:1,”w”:0}, “my_rw_authkey”:{“r”:0,”w”:1}, “my_admin_authkey”:{“r”:1,”w”:1}
}
}
},
}
Usage:
pubnub.audit (‘my_channel’); # Sync Mode
Method for decrypting data.
This method takes ciphertext as input and returns decrypted data. This need not be called directly as enncryption/decryption is taken care of transparently by Pubnub class if cipher key is provided at time of initializing pubnub object
Method for encrypting data.
This method takes plaintext as input and returns encrypted data. This need not be called directly as enncryption/decryption is taken care of transparently by Pubnub class if cipher key is provided at time of initializing pubnub object
Method for granting permissions.
This function establishes subscribe and/or write permissions for PubNub Access Manager (PAM) by setting the read or write attribute to true. A grant with read or write set to false (or not included) will revoke any previous grants with read or write set to true.
Returns a dict in sync mode i.e. when callback argument is not given The dict returned contains values with keys ‘message’ and ‘payload’
Sample Response: {
“message”:”Success”, “payload”:{
“ttl”:5, “auths”:{
“my_ro_authkey”:{“r”:1,”w”:0}}, “subscribe_key”:”my_subkey”, “level”:”user”, “channel”:”my_channel”
}
}
Get here now data.
You can obtain information about the current state of a channel including a list of unique user-ids currently subscribed to the channel and the total occupancy count of the channel by calling the here_now() function in your application.
Sync Mode: list Async Mode: None
Response Format:
The here_now() method returns a list of uuid s currently subscribed to the channel.
uuids:[“String”,”String”, ... ,”String”] - List of UUIDs currently subscribed to the channel.
occupancy: Number - Total current occupancy of the channel.
Example Response: {
occupancy: 4, uuids: [
‘123123234t234f34fq3dq’, ‘143r34f34t34fq34q34q3’, ‘23f34d3f4rq34r34rq23q’, ‘w34tcw45t45tcw435tww3’,]
}
This method fetches historical messages of a channel.
PubNub Storage/Playback Service provides real-time access to an unlimited history for all messages published to PubNub. Stored messages are replicated across multiple availability zones in several geographical data center locations. Stored messages can be encrypted with AES-256 message encryption ensuring that they are not readable while stored on PubNub’s network.
It is possible to control how messages are returned and in what order, for example you can:
Return messages in the order newest to oldest (default behavior).
Return messages in the order oldest to newest by setting reverse to true.
Page through results by providing a start or end time token.
Retrieve a “slice” of the time line by providing both a start and end time token.
Limit the number of messages to a specific quantity using the count parameter.
Returns a list in sync mode i.e. when callback argument is not given
Subscribe to presence data on a channel.
Only works in async mode
channel: Channel name ( string ) on which to publish message callback: A callback method should be passed to the method.
If set, the api works in async mode. Required argument when working with twisted or tornado .
Publishes data on a channel.
The publish() method is used to send a message to all subscribers of a channel. To publish a message you must first specify a valid publish_key at initialization. A successfully published message is replicated across the PubNub Real-Time Network and sent simultaneously to all subscribed clients on a channel.
Messages in transit can be secured from potential eavesdroppers with SSL/TLS by
setting ssl to True during initialization.
Published messages can also be encrypted with AES-256 simply by specifying a cipher_key during initialization.
Sync Mode : list Async Mode : None
The function returns the following formatted response:
[ Number, “Status”, “Time Token”]
The output below demonstrates the response to a successful call:
[1,”Sent”,”13769558699541401”]
Method for revoking permissions.
Returns a dict in sync mode i.e. when callback argument is not given The dict returned contains values with keys ‘message’ and ‘payload’
Sample Response: {
“message”:”Success”, “payload”:{
“ttl”:5, “auths”:{
“my_authkey”:{“r”:0,”w”:0}}, “subscribe_key”:”my_subkey”, “level”:”user”, “channel”:”my_channel”
}
}
Subscribe to data on a channel.
This function causes the client to create an open TCP socket to the PubNub Real-Time Network and begin listening for messages on a specified channel. To subscribe to a channel the client must send the appropriate subscribe_key at initialization.
Only works in async mode
This function will return a 17 digit precision Unix epoch.
Args:
- callback: (optional)
- A callback method should be passed to the method. If set, the api works in async mode. Required argument when working with twisted or tornado .
Returns a 17 digit number in sync mode i.e. when callback argument is not given
channel: Channel name ( string ) on which to publish message message: Message to be published ( String / int / double / dict / list ). callback: A callback method should be passed to the method.
If set, the api works in async mode. Required argument when working with twisted or tornado .