- Notifications
You must be signed in to change notification settings - Fork24
Use Requests instead of httplib2#18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
16 commits Select commitHold shift + click to select a range
c07bacb
Add classifiers to zencoder-py package
cc1c1af
Use setuptools instead of distutils
e65f7b3
add version, author and title attrs to zencoder package
8999dda
Change HTTP library from httplib2 to requests.
1e824cc
Remove unneeded test
6b2f475
Remove references to XML
23d5da2
Test python 3.3 and pypy
397fcf4
Remove dependency on `urllib.urlencode`
0d9fdbc
Remove `encode` method and use `json.dumps` directly.
e574bbb
Pass `response.content` into `ZencoderResponseError`
0479f96
Implement unit tests with `mock`
fb1d90f
Use assertTrue instead of assertGreater in tests.
754b3b4
Update README
38d1e4e
Merge branch 'master' into requests-http
a6479eb
Add test for `Job.finish`
05d0d18
Add `live_stream` kwarg to Job.create
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
5 changes: 4 additions & 1 deletion.travis.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletionsREADME.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
22 changes: 18 additions & 4 deletionssetup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletionstest/fixtures/account_create.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"api_key": "abcd1234", | ||
"password": "foo" | ||
} |
8 changes: 8 additions & 0 deletionstest/fixtures/account_details.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"account_state": "active", | ||
"plan": "Growth", | ||
"minutes_used": 12549, | ||
"minutes_included": 25000, | ||
"billing_state": "active", | ||
"integration_mode":true | ||
} |
10 changes: 10 additions & 0 deletionstest/fixtures/job_create.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"outputs": [ | ||
{ | ||
"label": null, | ||
"url": "https://zencoder-temp-storage-us-east-1.s3.amazonaws.com/o/20130505/7a9f3b6947c27305079fb105dbfc529e/34356e4d54f0c8fb9c3273203937e795.mp4?AWSAccessKeyId=AKIAI456JQ76GBU7FECA&Signature=Tp9WVinpXKE%2FPrP2M08r54U4EQ0%3D&Expires=1367817210", | ||
"id": 93461812 | ||
} | ||
], | ||
"id": 45492475 | ||
} |
12 changes: 12 additions & 0 deletionstest/fixtures/job_create_live.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"stream_url": "rtmp://foo:1935/live", | ||
"stream_name": "bar", | ||
"outputs": [ | ||
{ | ||
"label": null, | ||
"url": "https://zencoder-temp-storage-us-east-1.s3.amazonaws.com", | ||
"id": 97931084 | ||
} | ||
], | ||
"id": 47010105 | ||
} |
69 changes: 69 additions & 0 deletionstest/fixtures/job_details.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"job": { | ||
"submitted_at": "2013-05-04T21:36:39-07:00", | ||
"state": "finished", | ||
"privacy": false, | ||
"input_media_file": { | ||
"video_codec": "h264", | ||
"frame_rate": 30, | ||
"channels": "2", | ||
"audio_codec": "aac", | ||
"audio_bitrate_in_kbps": 50, | ||
"state": "finished", | ||
"format": "mpeg4", | ||
"audio_sample_rate": 44100, | ||
"privacy": false, | ||
"height": 720, | ||
"error_message": null, | ||
"url": "s3://test-bucket/test.mov", | ||
"video_bitrate_in_kbps": 1402, | ||
"md5_checksum": null, | ||
"duration_in_ms": 5067, | ||
"test": false, | ||
"id": 45469002, | ||
"finished_at": "2013-05-04T21:36:46-07:00", | ||
"updated_at": "2013-05-04T21:37:12-07:00", | ||
"created_at": "2013-05-04T21:36:39-07:00", | ||
"total_bitrate_in_kbps": 1452, | ||
"width": 1280, | ||
"error_class": null, | ||
"file_size_bytes": 922620 | ||
}, | ||
"test": false, | ||
"id": 45491013, | ||
"finished_at": "2013-05-04T21:37:12-07:00", | ||
"updated_at": "2013-05-04T21:37:12-07:00", | ||
"created_at": "2013-05-04T21:36:39-07:00", | ||
"thumbnails": [], | ||
"output_media_files": [ | ||
{ | ||
"video_codec": "h264", | ||
"frame_rate": 30, | ||
"channels": "2", | ||
"audio_codec": "aac", | ||
"audio_bitrate_in_kbps": 90, | ||
"state": "finished", | ||
"format": "mpeg4", | ||
"audio_sample_rate": 44100, | ||
"label": null, | ||
"privacy": false, | ||
"height": 720, | ||
"error_message": null, | ||
"url": "https://zencoder-temp-storage-us-east-1.s3.amazonaws.com/o/20130505/fc7f7df4f3eacd6fe4ee88cab28732de/dfc2f1b4eb49ea9ab914c84de6d392fb.mp4?AWSAccessKeyId=AKIAI456JQ76GBU7FECA&Signature=lAc18iXd4ta1Ct0JyazKwYSwdOk%3D&Expires=1367815032", | ||
"video_bitrate_in_kbps": 1440, | ||
"md5_checksum": null, | ||
"duration_in_ms": 5130, | ||
"test": false, | ||
"id": 93457943, | ||
"finished_at": "2013-05-04T21:37:12-07:00", | ||
"updated_at": "2013-05-04T21:37:12-07:00", | ||
"created_at": "2013-05-04T21:36:39-07:00", | ||
"total_bitrate_in_kbps": 1530, | ||
"width": 1280, | ||
"error_class": null, | ||
"file_size_bytes": 973430 | ||
} | ||
], | ||
"pass_through": null | ||
} | ||
} |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.