10000 Add docstrings. · twilio/twilio-python@7dc8195 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7dc8195

Browse files
author
Sarah Stringer
committed
Add docstrings.
1 parent cef162c commit 7dc8195

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/unit/jwt/test_access_token.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ def test_task_router_grant(self):
244244
}, decoded_token.payload['grants']['task_router'])
245245

246246
def test_playback_grant(self):
247+
"""Test that PlaybackGrants are created and decoded correctly."""
247248
grant = {
248249
'requestCredentials': None,
249250
'playbackUrl': 'https://000.us-east-1.playback.live-video.net/api/video/v1/us-east-000.channel.000?token=xxxxx',

twilio/jwt/access_token/grants.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,16 @@ def to_payload(self):
200200

201201
class PlaybackGrant(AccessTokenGrant):
202202
"""Grant to access Twilio Live stream"""
203+
203204
def __init__(self, grant=None):
205+
"""Initialize a PlaybackGrant with a grant retrieved from the Twilio API."""
204206
self.grant = grant
205207

206208
@property
207209
def key(self):
210+
"""Return the grant's key."""
208211
return "player"
209212

210213
def to_payload(self):
214+
"""Return the grant."""
211215
return self.grant

0 commit comments

Comments
 (0)
0