Skip to content

Commit 9c0e870

Browse files
authored
Merge pull request #16 from Kreusada/patch-1
README should use python codeblocks
2 parents a2b1a2d + 991371d commit 9c0e870

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ For API v1, please use [v1 branch](https://github.com/cloudconvert/cloudconvert-
1515

1616
## Creating API Client
1717

18-
```
19-
import cloudconvert
20-
21-
cloudconvert.configure(api_key = 'API_KEY', sandbox = False)
18+
```py
19+
import cloudconvert
20+
21+
cloudconvert.configure(api_key = 'API_KEY', sandbox = False)
2222
```
2323

2424
Or set the environment variable `CLOUDCONVERT_API_KEY` and use:
2525

26-
```
27-
import cloudconvert
28-
29-
cloudconvert.default()
26+
```py
27+
import cloudconvert
28+
29+
cloudconvert.default()
3030
```
3131

3232
## Creating Jobs
3333

34-
```js
34+
```py
3535
import cloudconvert
3636

3737
cloudconvert.configure(api_key = 'API_KEY')
@@ -61,7 +61,7 @@ Or set the environment variable `CLOUDCONVERT_API_KEY` and use:
6161

6262
CloudConvert can generate public URLs for using `export/url` tasks. You can use these URLs to download output files.
6363

64-
```js
64+
```py
6565
exported_url_task_id = "84e872fc-d823-4363-baab-eade2e05ee54"
6666
res = cloudconvert.Task.wait(id=exported_url_task_id) # Wait for job completion
6767
file = res.get("result").get("files")[0]
@@ -73,7 +73,7 @@ print(res)
7373

7474
Uploads to CloudConvert are done via `import/upload` tasks (see the [docs](https://cloudconvert.com/api/v2/import#import-upload-tasks)). This SDK offers a convenient upload method:
7575

76-
```js
76+
```py
7777
job = cloudconvert.Job.create(payload={
7878
'tasks': {
7979
'upload-my-file': {
@@ -93,7 +93,7 @@ res = cloudconvert.Task.find(id=upload_task_id)
9393

9494
The node SDK allows to verify webhook requests received from CloudConvert.
9595

96-
```js
96+
```py
9797
payloadString = '...'; # The JSON string from the raw request body.
9898
signature = '...'; # The value of the "CloudConvert-Signature" header.
9999
signingSecret = '...'; # You can find it in your webhook settings.

0 commit comments

Comments
 (0)