Skip to content

Commit c8515e4

Browse files
author
Sven
committed
Updated examples
1 parent a9ee2df commit c8515e4

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

README

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ pip install keycdn
1414
import keycdn
1515

1616
...
17-
keycdn = keycdn.Api('<your_api_key>')
17+
api = keycdn.Api('<your_api_key>')
1818

1919
```
2020

2121
### Get all zones
2222
```python
23-
keycdn.get('zones.json')
23+
api.get('zones.json')
2424
```
2525

2626
### Get a specific zone
2727
```python
28-
keycdn.post('zones/<zoneId>.json')
28+
api.post('zones/<zoneId>.json')
2929
```
3030

3131
### Purge zone cache
3232
```python
33-
keycdn.get('zones/purge/<zoneId>.json')
33+
api.get('zones/purge/<zoneId>.json')
3434
```
3535

3636

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ pip install keycdn
1414
import keycdn
1515

1616
...
17-
keycdn = keycdn.Api('<your_api_key>')
17+
api = keycdn.Api('<your_api_key>')
1818

1919
```
2020

2121
### Get all zones
2222
```python
23-
keycdn.get('zones.json')
23+
api.get('zones.json')
2424
```
2525

2626
### Get a specific zone
2727
```python
28-
keycdn.post('zones/<zoneId>.json')
28+
api.post('zones/<zoneId>.json')
2929
```
3030

3131
### Purge zone cache
3232
```python
33-
keycdn.get('zones/purge/<zoneId>.json')
33+
api.get('zones/purge/<zoneId>.json')
3434
```
3535

3636

examples.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33

44
def run_test():
5-
keycdn = keycdn.Api('sk_prod_Y2MzN2RkZjQ1MzgxNTRkNzU2')
5+
api = keycdn.Api('sk_prod_Y2MzN2RkZjQ1MzgxNTRkNzU2')
66

77
# returns dict object
8-
print(keycdn.get('zones.json'))
8+
print(api.get('zones.json'))
99

10-
result = keycdn.post('zones/37861.json', {'gzip': 'disabled'})
10+
result = api.post('zones/37861.json', {'gzip': 'disabled'})
1111
if result['status'] == 'success':
1212
print('Successfully renamed zone')
1313
else:

0 commit comments

Comments
 (0)