Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
schworer merged 16 commits intomasterfromrequests-http
May 21, 2013
Merged
Changes from1 commit
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
c07bacb
Add classifiers to zencoder-py package
May 3, 2013
cc1c1af
Use setuptools instead of distutils
May 3, 2013
e65f7b3
add version, author and title attrs to zencoder package
May 3, 2013
8999dda
Change HTTP library from httplib2 to requests.
May 18, 2013
1e824cc
Remove unneeded test
May 18, 2013
6b2f475
Remove references to XML
May 19, 2013
23d5da2
Test python 3.3 and pypy
May 19, 2013
397fcf4
Remove dependency on `urllib.urlencode`
May 19, 2013
0d9fdbc
Remove `encode` method and use `json.dumps` directly.
May 19, 2013
e574bbb
Pass `response.content` into `ZencoderResponseError`
May 19, 2013
0479f96
Implement unit tests with `mock`
May 19, 2013
fb1d90f
Use assertTrue instead of assertGreater in tests.
May 20, 2013
754b3b4
Update README
May 20, 2013
38d1e4e
Merge branch 'master' into requests-http
May 21, 2013
a6479eb
Add test for `Job.finish`
May 21, 2013
05d0d18
Add `live_stream` kwarg to Job.create
May 21, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Removeencode method and usejson.dumps directly.
  • Loading branch information
Alex Schworer committedMay 19, 2013
commit0d9fdbccbb6b447bf41f991432e8065bcc1afa98
11 changes: 2 additions & 9 deletionszencoder/core.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -67,13 +67,6 @@ def headers(self):

return headers

def encode(self, data):
"""
Encodes data as JSON (by calling `json.dumps`), so that it can be
passed onto the Zencoder API.
"""
return json.dumps(data)

def delete(self, url, params=None):
"""
Executes an HTTP DELETE request for the given URL
Expand DownExpand Up@@ -194,7 +187,7 @@ def create(self, email, tos=1, options=None):
if options:
data.update(options)

return self.post(self.base_url, body=self.encode(data))
return self.post(self.base_url, body=json.dumps(data))

def details(self):
"""
Expand DownExpand Up@@ -262,7 +255,7 @@ def create(self, input, outputs=None, options=None):
if options:
data.update(options)

return self.post(self.base_url, body=self.encode(data))
return self.post(self.base_url, body=json.dumps(data))

def list(self, page=1, per_page=50):
"""
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp