Skip to content
Browse files

Merge branch 'master' of github.com:netdna/netdnarws

  • Loading branch information...
2 parents e937715 + 9a27d82 commit bbbbe801ada7c64da9bfd05bebddc1f76db5e691 @dlitvakb dlitvakb committed Jan 30, 2013
Showing with 21 additions and 1 deletion.
  1. +21 −1 README.md
View
22 README.md
@@ -1,5 +1,11 @@
# NetDNA REST Web Services Python Client
+## Prerequisites
+
+`sudo pip install requests`
+
+`sudo pip install certifi`
+
## Installation
`sudo pip install netdnarws`
@@ -9,11 +15,25 @@ from netdnarws import NetDNA
api = NetDNA("myalias", "consumer_key", "consumer_secret")
+# Get Account Info
api.get("/account.json")
+
+# Create Pull Zone
+api.post("/zones/pull.json", {'name': 'mypullzone', 'url': 'http://yourorigin.com', 'compress': '1'})
+
+# Update Pull Zone
+api.put("/zones/pull.json/12345", {'url': 'http://neworigin.com'})
+
+# Purge All Cache
+api.delete("/zones/pull.json/12345/cache")
+
+# Purge File
+api.delete("/zones/pull.json/77573/cache", data={'file': '/my-file.png'})
+
```
## Methods
-It has support for GET, POST, PUT and DELETE ouath signed requests.
+It has support for `GET`, `POST`, `PUT` and `DELETE` OAuth signed requests.
Every request can take an optional debug parameter.
```python

0 comments on commit bbbbe80

Please sign in to comment.
Something went wrong with that request. Please try again.