diff options
| author | Teddy Wing | 2015-09-03 22:56:27 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-09-03 22:56:27 -0400 |
| commit | 40b6baae7de2d771a6acf35e60f55e20b7601264 (patch) | |
| tree | 84f85eb7aff5e747f967bbc8988f071d96d9f614 | |
| parent | de21caa8524db6bbf7f204aa817b5ddb5d77d3ca (diff) | |
| download | pubnub-python-40b6baae7de2d771a6acf35e60f55e20b7601264.tar.bz2 | |
fix(grant,revoke): Change default ttl to `1440`update-ttl
Update the default time-to-live argument value in `Pubnub.grant` and
`Pubnub.revoke` to 1440.
The docs for PubNub's JavaScript, Ruby, and Python SDKs all describe the
`ttl` parameter's default value as `1440` (or 24 hours):
- [JavaScript](http://www.pubnub.com/docs/web-javascript/api-reference#grant)
- [Ruby](http://www.pubnub.com/docs/ruby/api-reference#grant)
- [Python](http://www.pubnub.com/docs/python/api-reference#grant)
This information was not reflected in the `grant` and `revoke` methods.
Update their defaults to reflect the expected value given the
information from the documentation.
| -rw-r--r-- | pubnub.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -383,7 +383,7 @@ class PubnubBase(object): return self.auth_key def grant(self, channel=None, channel_group=None, auth_key=False, read=False, - write=False, manage=False, ttl=5, callback=None, error=None): + write=False, manage=False, ttl=1440, callback=None, error=None): """Method for granting permissions. This function establishes subscribe and/or write permissions for @@ -476,7 +476,8 @@ class PubnubBase(object): 'pnsdk' : self.pnsdk }, callback=callback, error=error) - def revoke(self, channel=None, channel_group=None, auth_key=None, ttl=1, callback=None, error=None): + def revoke(self, channel=None, channel_group=None, auth_key=None, ttl=1440, + callback=None, error=None): """Method for revoking permissions. Args: |
