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

Commit0d9fdbc

Browse files
author
Alex Schworer
committed
Removeencode method and usejson.dumps directly.
1 parent397fcf4 commit0d9fdbc

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

‎zencoder/core.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,6 @@ def headers(self):
6767

6868
returnheaders
6969

70-
defencode(self,data):
71-
"""
72-
Encodes data as JSON (by calling `json.dumps`), so that it can be
73-
passed onto the Zencoder API.
74-
"""
75-
returnjson.dumps(data)
76-
7770
defdelete(self,url,params=None):
7871
"""
7972
Executes an HTTP DELETE request for the given URL
@@ -194,7 +187,7 @@ def create(self, email, tos=1, options=None):
194187
ifoptions:
195188
data.update(options)
196189

197-
returnself.post(self.base_url,body=self.encode(data))
190+
returnself.post(self.base_url,body=json.dumps(data))
198191

199192
defdetails(self):
200193
"""
@@ -262,7 +255,7 @@ def create(self, input, outputs=None, options=None):
262255
ifoptions:
263256
data.update(options)
264257

265-
returnself.post(self.base_url,body=self.encode(data))
258+
returnself.post(self.base_url,body=json.dumps(data))
266259

267260
deflist(self,page=1,per_page=50):
268261
"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp