Commits

ben...@couch.test  committed 22b8be1

add doc for console client

  • Participants
  • Parent commits 350ddd3

Comments (0)

Files changed (4)

 store/*
 *.DS_Store
 *.beam
+py_restclient.egg-info
+dist
 
 syntax: regexp
 .*\#.*\#$
+include COPYING
+include LICENSE
+include README.txt

File docs/console.txt

+.. _console:
+
+Console client
+==============
+
+A console client is available with py-restclient. It allow you to perform any HTTP
+ request you need in console.
+
+Examples :
+----------
+create a paste in Friedpaste from command line:
+
+    benoitc@pollen:/tmp$ restcli -H "Accept:application/json" -H "Content-Type: application/json" -o result.json http://friendpaste.com POST - < test.json 
+{"url": "http://friendpaste.com/1Po5tOC012QeFYOS3b3RaA", "rev": "373163383163", "ok": true, "id": "1Po5tOC012QeFYOS3b3RaA"}
+
+This command send tes.json file to Friendpaste and you get back the full url of paste in json result.
+
+test.json:
+
+    {
+        "title":"I like to paste stuff",
+        "snippet":"My own paste",
+        "language":"text"
+    }
+
+Get your twitter status time line :
+
+    restcli http://XXXXXXX:XXXXXXX@twitter.com/statuses/user_timeline.json
+
+
+Usage :
+-------
+
+Options:
+  --version             show program's version number and exit
+  -h, --help            show this help message and exit
+  -H HEADERS, --header=HEADERS
+                        http string header in the form of Key:Value. For
+                        example: "Accept: application/json"
+  -i FILE, --input=FILE
+                        the name of the file to read from
+  -o OUTPUT, --output=OUTPUT
+                        the name of the file to read from
+  --proxy=PROXY         Full uri of proxy, ex:
+                        http://username:password@proxy:port/
+
+

File docs/index.txt

    
    installation
    gettingstarted
+   console
    whatsnew
 
 .. _api: