Anonymous avatar Anonymous committed 51e5de2

new version. update doc.

Comments (0)

Files changed (14)

Add a comment to this file

docs/_build/doctrees/environment.pickle

Binary file modified.

Add a comment to this file

docs/_build/doctrees/index.doctree

Binary file modified.

Add a comment to this file

docs/_build/doctrees/resource.doctree

Binary file modified.

docs/_build/html/_sources/index.txt

    
    installation
    gettingstarted
+   whatsnew
 
 .. _api:
 

docs/_build/html/_sources/resource.txt

     >>> res = Resource('http://friendpaste.com')
     >>> res.get('/5rOqE9XTz7lccLgZoQS4IP',headers={'Accept': 'application/json'})
     '{"snippet": "hi!", "title": "", "id": "5rOqE9XTz7lccLgZoQS4IP", "language": "text", "revision": "386233396230"}'
-
+    >>> res.get('/5rOqE9XTz7lccLgZoQS4IP',headers={'Accept': 'application/json'}).http_code
+    200
 
 Resource class
 --------------
 
     .. automethod:: restclient.rest.RestClient.make_request
 
+ResourceResult class
+--------------------
 
+.. autoclass:: restclient.rest.ResourceResult
+ 
 Exceptions
 ----------
 

docs/_build/html/genindex.html

 <dt><a href="resource.html#restclient.rest.Resource.get">get() (restclient.rest.Resource method)</a></dt>
   <dd><dl>
     <dt><a href="resource.html#restclient.rest.RestClient.get">(restclient.rest.RestClient method)</a></dt>
-  </dl></dd>
-<dt><a href="resource.html#restclient.rest.Resource.get_status_code">get_status_code() (restclient.rest.Resource method)</a></dt></dl></td><td width="33%" valign="top"><dl>
+  </dl></dd></dl></td><td width="33%" valign="top"><dl>
 <dt><a href="httpclient.html#restclient.http.getDefaultHTTPClient">getDefaultHTTPClient() (in module restclient.http)</a></dt>
 </dl></td></tr></table>
 
 <dt><a href="resource.html#restclient.rest.RequestFailed">RequestFailed</a></dt>
 <dt><a href="resource.html#restclient.rest.Resource">Resource (class in restclient.rest)</a></dt>
 <dt><a href="resource.html#restclient.rest.ResourceNotFound">ResourceNotFound</a></dt></dl></td><td width="33%" valign="top"><dl>
+<dt><a href="resource.html#restclient.rest.ResourceResult">ResourceResult (class in restclient.rest)</a></dt>
 <dt><a href="resource.html#restclient.rest.RestClient">RestClient (class in restclient.rest)</a></dt>
 <dt><a href="resource.html#module-restclient">restclient (module)</a>, <a href="httpclient.html#module-restclient">[1]</a></dt>
 </dl></td></tr></table>

docs/_build/html/index.html

 </ul>
 </li>
 </ul>
+<ul>
+<li class="toctree-l1"><a class="reference" href="whatsnew.html">What&#8217;s New in python-restclient 1.0</a><ul>
+<li class="toctree-l2"><a class="reference" href="whatsnew.html#change-in-results-returned">Change in results returned</a></li>
+</ul>
+</li>
+</ul>
 </div>
 <div class="section" id="reference">
 <span id="api"></span><h1>Reference<a class="headerlink" href="#reference" title="Permalink to this headline">¶</a></h1>
 <li class="toctree-l1"><a class="reference" href="resource.html">Resource</a><ul>
 <li class="toctree-l2"><a class="reference" href="resource.html#resource-class">Resource class</a></li>
 <li class="toctree-l2"><a class="reference" href="resource.html#restclient-class">RestClient class</a></li>
+<li class="toctree-l2"><a class="reference" href="resource.html#resourceresult-class">ResourceResult class</a></li>
 <li class="toctree-l2"><a class="reference" href="resource.html#exceptions">Exceptions</a></li>
 </ul>
 </li>

docs/_build/html/objects.inv

 restclient.http.HTTPClient class httpclient.html
 restclient.rest.Resource class resource.html
 restclient.http.createHTTPClient function httpclient.html
+restclient.rest.ResourceResult class resource.html
 restclient.http.HTTPLib2HTTPClient class httpclient.html
 restclient.http.getDefaultHTTPClient function httpclient.html
 restclient.http.Urllib2HTTPClient class httpclient.html
 restclient.rest.RestClient.make_request method resource.html
 restclient.rest.RestClient class resource.html
 restclient.rest.RestClient.head method resource.html
-restclient.rest.Resource.get_status_code method resource.html
 restclient.http.HTTPClient.request method httpclient.html
 restclient.http.CurlHTTPClient class httpclient.html
 restclient.rest.RequestFailed exception resource.html

docs/_build/html/resource.html

     <link rel="search" title="Search" href="search.html" />
     <link rel="top" title="python-restclient v0.2 documentation" href="index.html" />
     <link rel="next" title="HTTP Clients" href="httpclient.html" />
-    <link rel="prev" title="Getting Started" href="gettingstarted.html" /> 
+    <link rel="prev" title="What&#8217;s New in python-restclient 1.0" href="whatsnew.html" /> 
   </head>
   <body>
     <div class="related">
           <a href="httpclient.html" title="HTTP Clients"
              accesskey="N">next</a> |</li>
         <li class="right" >
-          <a href="gettingstarted.html" title="Getting Started"
+          <a href="whatsnew.html" title="What&#8217;s New in python-restclient 1.0"
              accesskey="P">previous</a> |</li>
         <li><a href="index.html">python-restclient v0.2 documentation</a> &raquo;</li> 
       </ul>
 <span class="gp">&gt;&gt;&gt; </span><span class="n">res</span> <span class="o">=</span> <span class="n">Resource</span><span class="p">(</span><span class="s">&#39;http://friendpaste.com&#39;</span><span class="p">)</span>
 <span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;/5rOqE9XTz7lccLgZoQS4IP&#39;</span><span class="p">,</span><span class="n">headers</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;Accept&#39;</span><span class="p">:</span> <span class="s">&#39;application/json&#39;</span><span class="p">})</span>
 <span class="go">&#39;{&quot;snippet&quot;: &quot;hi!&quot;, &quot;title&quot;: &quot;&quot;, &quot;id&quot;: &quot;5rOqE9XTz7lccLgZoQS4IP&quot;, &quot;language&quot;: &quot;text&quot;, &quot;revision&quot;: &quot;386233396230&quot;}&#39;</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">res</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&#39;/5rOqE9XTz7lccLgZoQS4IP&#39;</span><span class="p">,</span><span class="n">headers</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;Accept&#39;</span><span class="p">:</span> <span class="s">&#39;application/json&#39;</span><span class="p">})</span><span class="o">.</span><span class="n">http_code</span>
+<span class="go">200</span>
 </pre></div>
 </div>
 <div class="section" id="resource-class">
 <dt id="restclient.rest.Resource.__call__">
 <!--[restclient.rest.Resource.__call__]--><tt class="descname">__call__</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#restclient.rest.Resource.__call__" title="Permalink to this definition">¶</a></dt>
 <dd><p>if you want to add a path to resource uri, you can do:</p>
-<div class="highlight-python"><div class="highlight"><pre><span class="n">Resource</span><span class="p">(</span><span class="s">&quot;/path&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">&quot;GET&quot;</span><span class="p">)</span>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">Resource</span><span class="p">(</span><span class="s">&quot;/path&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">get</span><span class="p">()</span>
 </pre></div>
 </div>
 </dd></dl>
 </dd></dl>
 
 <dl class="method">
-<dt id="restclient.rest.Resource.get_status_code">
-<!--[restclient.rest.Resource.get_status_code]--><tt class="descname">get_status_code</tt><big>(</big><big>)</big><a class="headerlink" href="#restclient.rest.Resource.get_status_code" title="Permalink to this definition">¶</a></dt>
-<dd>get status code of the last request</dd></dl>
-
-<dl class="method">
 <dt id="restclient.rest.Resource.update_uri">
 <!--[restclient.rest.Resource.update_uri]--><tt class="descname">update_uri</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#restclient.rest.Resource.update_uri" title="Permalink to this definition">¶</a></dt>
 <dd>to set a new uri absolute path</dd></dl>
 </dd></dl>
 
 </div>
+<div class="section" id="resourceresult-class">
+<h2>ResourceResult class<a class="headerlink" href="#resourceresult-class" title="Permalink to this headline">¶</a></h2>
+<dl class="class">
+<dt id="restclient.rest.ResourceResult">
+<!--[restclient.rest.ResourceResult]-->class <tt class="descclassname">restclient.rest.</tt><tt class="descname">ResourceResult</tt><a class="headerlink" href="#restclient.rest.ResourceResult" title="Permalink to this definition">¶</a></dt>
+<dd><p>result returned by <cite>restclient.rest.RestClient</cite>.</p>
+<p>you can get result like as string and  status code by result.http_code, 
+or see anything about the response via result.response. For example, the entire 
+result body is result.response.body.</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">restclient</span> <span class="kn">import</span> <span class="n">RestClient</span>
+<span class="n">client</span> <span class="o">=</span> <span class="n">RestClient</span><span class="p">()</span>
+<span class="n">page</span> <span class="o">=</span> <span class="n">resource</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">&#39;GET&#39;</span><span class="p">,</span> <span class="s">&#39;http://friendpaste.com&#39;</span><span class="p">)</span>
+<span class="k">print</span> <span class="n">page</span>
+<span class="k">print</span> <span class="s">&quot;http code </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">page</span><span class="o">.</span><span class="n">http_code</span>
+</pre></div>
+</div>
+</dd></dl>
+
+</div>
 <div class="section" id="exceptions">
 <h2>Exceptions<a class="headerlink" href="#exceptions" title="Permalink to this headline">¶</a></h2>
 <dl class="exception">
 <dt id="restclient.rest.ResourceNotFound">
 <!--[restclient.rest.ResourceNotFound]-->exception <tt class="descclassname">restclient.rest.</tt><tt class="descname">ResourceNotFound</tt><a class="headerlink" href="#restclient.rest.ResourceNotFound" title="Permalink to this definition">¶</a></dt>
-<dd>Exception raised when a 404 HTTP error is received in response to a
-request.</dd></dl>
+<dd>Exception raised when no resource was found at the given url.</dd></dl>
 
 <dl class="exception">
 <dt id="restclient.rest.Unauthorized">
 <!--[restclient.rest.Unauthorized]-->exception <tt class="descclassname">restclient.rest.</tt><tt class="descname">Unauthorized</tt><a class="headerlink" href="#restclient.rest.Unauthorized" title="Permalink to this definition">¶</a></dt>
-<dd>Exception raised when a 401 HTTP error is received in response to a
-request.</dd></dl>
+<dd>Exception raised when an authorization is required to access to
+the resource specified.</dd></dl>
 
 <dl class="exception">
 <dt id="restclient.rest.RequestFailed">
 <!--[restclient.rest.RequestFailed]-->exception <tt class="descclassname">restclient.rest.</tt><tt class="descname">RequestFailed</tt><a class="headerlink" href="#restclient.rest.RequestFailed" title="Permalink to this definition">¶</a></dt>
-<dd>Exception raised when an unexpected HTTP error is received in response
-to a request.</dd></dl>
+<dd><p>Exception raised when an unexpected HTTP error is received in response
+to a request.</p>
+<p>The request failed, meaning the remote HTTP server returned a code 
+other than success, unauthorized, or NotFound.</p>
+<p>The exception message attempts to extract the error</p>
+<p>You can get the status code by e.http_code, or see anything about the 
+response via e.response. For example, the entire result body (which is 
+probably an HTML error page) is e.response.body.</p>
+</dd></dl>
 
 </div>
 </div>
 <li><a class="reference" href="">Resource</a><ul>
 <li><a class="reference" href="#resource-class">Resource class</a></li>
 <li><a class="reference" href="#restclient-class">RestClient class</a></li>
+<li><a class="reference" href="#resourceresult-class">ResourceResult class</a></li>
 <li><a class="reference" href="#exceptions">Exceptions</a></li>
 </ul>
 </li>
 </ul>
 
             <h4>Previous topic</h4>
-            <p class="topless"><a href="gettingstarted.html" title="previous chapter">Getting Started</a></p>
+            <p class="topless"><a href="whatsnew.html" title="previous chapter">What&#8217;s New in python-restclient 1.0</a></p>
             <h4>Next topic</h4>
             <p class="topless"><a href="httpclient.html" title="next chapter">HTTP Clients</a></p>
             <h3>This Page</h3>
           <a href="httpclient.html" title="HTTP Clients"
              accesskey="N">next</a> |</li>
         <li class="right" >
-          <a href="gettingstarted.html" title="Getting Started"
+          <a href="whatsnew.html" title="What&#8217;s New in python-restclient 1.0"
              accesskey="P">previous</a> |</li>
         <li><a href="index.html">python-restclient v0.2 documentation</a> &raquo;</li> 
       </ul>

docs/_build/html/searchindex.js

-Search.setIndex({desctypes:{"0":"method","1":"class","2":"function","3":"attribute","4":"exception"},terms:{urllib2httpclien:1,all:2,code:[0,2],text:2,over:2,rest:[0,2,4],veri:1,actuib:1,via:3,through:[0,4],follow:4,mainli:0,yet:0,languag:2,paramet:[2,1],xml:2,absolut:2,style:4,specif:1,depend:[2,1],expos:0,wed:4,sinatra:4,except:[4,2],param:[2,1],should:[4,1],add:[2,1],version:3,dict:[2,1],master:4,"__call__":2,"case":1,httplib2httpclient:[2,1],applic:[0,2],sourc:[4,3],"return":[2,1],string:2,get:[0,1,2,3,4],python:[0,1,3,4],prefer:1,auth:1,have:[0,1],know:4,"new":2,report:4,brows:4,requir:[4,3],restclient:[0,1,2,3,4],httpbasicauthhandl:1,like:4,getdefaulthttpcli:1,benoitc:3,list:2,authent:2,patch:1,provid:2,api:[0,2],common:2,timeout:1,contain:4,found:[],page:[0,2,4],mean:1,"3xdqq8g83llzvwgcewdwru":2,pthon:3,set:[2,1],repres:[2,1],some:1,direct:4,past:[0,2],see:[2,1],enki:4,toctre:4,fail:[],resourc:[0,1,2,4],server:2,librari:0,index:4,statu:2,simplecouchdb:3,make_request:[0,2],someth:1,pypast:2,camp:4,urllib:1,your:[3,1,2,4],access:[2,1],delet:[4,2,1],tracker:4,adapt:4,"import":[0,2,1],setdefaulthttpcli:1,get_status_cod:2,method:[2,1],refer:4,altern:3,full:2,run:1,proxi:[2,1],kei:0,htpp:1,engura:3,usag:[0,2],fisrt:4,here:1,bodi:[2,1],step:4,base:[2,1],multimedia:4,repositori:3,byth:4,releas:3,org:3,post:[4,2,1],sphinx:4,optionn:[2,1],search:4,last:[3,2],friendpast:[0,2],could:[3,2],manag:1,microframework:4,instanc:[2,1],decid:4,constructor:1,action:[4,2],mani:1,implement:1,createhttpcli:1,com:[0,2],oper:1,own:2,httppasswordmgrwithdefaultrealm:1,additionn:2,instanti:2,pythonpath:3,modul:[0,1,2,4],inspir:4,powerful:1,easy_instal:3,put:[2,1],resr2:2,fast:1,path:[3,2],instal:[0,2,3,4],payload:2,symlink:3,avail:3,alternatli:3,from:[0,2,3,1],wai:1,data:2,support:[0,1,2,4],been:1,mercuri:3,start:[0,4],json:[0,2],handler:1,interfac:[2,1],includ:[2,1],basic:[2,1],call:[0,1,2,4],httpclient:[2,1],"function":[4,1],head:[2,1],sudo:3,option:2,unexpect:2,auth_handl:1,"public":4,copi:3,setuptool:3,convert:2,specifi:4,site:3,least:4,accept:[0,2],requestfail:2,cheeseshop:3,recommand:1,bug:4,serv:2,none:[2,1],made:4,pycurl:[2,1],"default":[2,1],setup:3,properti:2,dev:3,project:4,url:1,can:[3,1,2,4],str:[2,1],error:2,about:[4,2],dec:4,root:4,update_uri:2,curlhttpclient:1,featur:[0,4],quickstart:4,creat:[4,1],request:[0,2,1],pass:2,anywher:3,indic:4,edfault:[],packag:3,file:4,tabl:4,need:[3,1,2,4],revis:2,curl:1,"__init__":1,alwai:3,headput:4,develop:[4,3],welcom:[4,1],want:[0,2,1],perform:[0,1,2,4],titl:2,make:[3,2,4],add_password:1,header:[0,2,1],unauthor:2,snippet:2,also:[3,2,1],when:[2,1],client:[0,1,2,4],read:0,resourcenotfound:2,which:[2,1],subdirectori:3,test:[2,1],command:3,you:[0,1,2,3,4],document:[0,4],simpl:[4,2],tutorial:0,complet:4,"5roqe9xtz7lcclgzoqs4ip":[0,2],http:[0,1,2,3,4],though:1,our:[4,3],cach:1,clone:[3,2],object:[2,1],urllib2:[2,1],password_mgr:1,most:3,rais:2,authentif:[2,1],respons:[2,1],"class":[4,2],urllib2httpcli:1,recent:3,bitbucket:[4,3],don:1,ani:[2,1],operform:[],directori:3,doc:0,later:3,descript:[0,2],uri:2,receiv:2,depth:0,exampl:[0,2,1],add_credenti:1,thi:[0,1,2,3,4],choos:1,everyth:4,parameterss:2,self:1,httplib2:[2,1]},titles:["Getting Started","HTTP Clients","Resource","Installation","Welcome to python-restclient&#8217;s documentation!"],modules:{restclient:2},descrefs:{"restclient.RestClient":{httpclient:[2,3]},"restclient.http.Urllib2HTTPClient":{"__init__":[1,0]},"restclient.http.HTTPClient":{request:[1,0]},"restclient.http":{createHTTPClient:[1,2],setDefaultHTTPClient:[1,2],HTTPLib2HTTPClient:[1,1],CurlHTTPClient:[1,1],Urllib2HTTPClient:[1,1],getDefaultHTTPClient:[1,2],HTTPClient:[1,1]},"restclient.Resource":{uri:[2,3],httpclient:[2,3]},"restclient.rest.Resource":{head:[2,0],get:[2,0],clone:[2,0],"__call__":[2,0],put:[2,0],post:[2,0],get_status_code:[2,0],update_uri:[2,0],"delete":[2,0]},"restclient.rest.RestClient":{head:[2,0],get:[2,0],put:[2,0],post:[2,0],make_request:[2,0],"delete":[2,0]},"restclient.rest":{RequestFailed:[2,4],Resource:[2,1],ResourceNotFound:[2,4],Unauthorized:[2,4],RestClient:[2,1]}},filenames:["gettingstarted","httpclient","resource","installation","index"]})
+Search.setIndex({desctypes:{"0":"method","1":"class","2":"function","3":"attribute","4":"exception"},terms:{urllib2httpclien:5,all:[4,1],code:[0,1,4],text:1,over:1,rest:[4,0,1,3],veri:5,actuib:5,via:[2,1,4],through:[0,3],follow:3,mainli:0,yet:0,languag:1,paramet:[1,5],xml:1,absolut:1,style:3,specif:5,depend:[1,5],expos:0,wed:3,explain:4,sinatra:3,except:[3,1,4],param:[1,5],should:[3,5],add:[1,5],version:[4,2],dict:[1,5],master:3,"__call__":1,"case":5,httplib2httpclient:[1,5],applic:[0,1],sourc:[3,2],"return":[3,5,1,4],string:[4,1],get:[0,1,2,3,4,5],python:[4,0,5,2,3],prefer:5,auth:5,have:[0,5,4],know:3,"new":[3,1,4],report:3,now:4,brows:3,requir:[2,1,3],restclient:[0,1,2,3,4,5],httpbasicauthhandl:5,messag:[4,1],like:[3,1],getdefaulthttpcli:5,anyth:[4,1],benoitc:2,list:1,html:[4,1],authent:1,patch:5,provid:1,api:[0,1],common:1,timeout:5,contain:3,found:1,page:[4,0,1,3],mean:[4,1,5],"3xdqq8g83llzvwgcewdwru":1,pthon:2,set:[1,5],repres:[1,5],some:5,direct:3,past:[0,1],see:[4,1,5],enki:3,toctre:3,fail:[4,1],resourc:[4,0,5,1,3],server:[4,1],extract:[4,1],librari:0,index:3,what:[3,4],simplecouchdb:2,make_request:[0,1],someth:5,pypast:1,camp:3,urllib:5,your:[2,5,1,3],access:[1,5],delet:[3,1,5],tracker:3,adapt:3,print:[4,1],"import":[0,5,1,4],setdefaulthttpcli:5,uri:1,get_status_cod:[],method:[1,5],refer:3,altern:2,full:1,run:5,proxi:[1,5],kei:0,htpp:5,unauthor:[4,1],engura:2,fisrt:3,here:5,bodi:[4,1,5],step:3,entir:[4,1],multimedia:3,repositori:2,byth:3,releas:2,org:2,post:[3,1,5],sphinx:3,optionn:[1,5],search:3,last:2,friendpast:[0,1,4],statu:[4,1],could:[2,1],success:[4,1],manag:5,microframework:3,base:[1,5],decid:3,constructor:5,action:[3,1],mani:5,implement:5,createhttpcli:5,com:[0,1,4],oper:5,client:[4,0,5,1,3],own:1,httppasswordmgrwithdefaultrealm:5,additionn:1,instanti:1,pythonpath:2,modul:[0,5,1,3],inspir:3,powerful:5,easy_instal:2,put:[1,5],resr2:1,fast:5,path:[2,1],restourceerror:4,instal:[0,1,2,3],articl:4,payload:1,symlink:2,avail:2,alternatli:2,from:[0,5,1,2,4],wai:5,data:1,support:[0,5,1,3],been:[4,5],mercuri:2,start:[0,3],json:[0,1],handler:5,interfac:[1,5],includ:[1,5],basic:[1,5],call:[0,5,1,3],httpclient:[1,5],"function":[3,5],head:[1,5],sudo:2,option:1,unexpect:[4,1],auth_handl:5,"public":3,copi:2,setuptool:2,convert:1,specifi:[3,1],site:2,resourceresult:[3,1],least:3,accept:[0,1],requestfail:1,cheeseshop:2,recommand:5,than:[4,1],serv:1,notfound:[4,1],none:[1,5],made:3,pycurl:[1,5],instanc:[4,1,5],remot:[4,1],setup:2,properti:1,request:[0,5,1,4],dev:2,project:3,url:[1,5],can:[4,2,5,1,3],str:[1,5],error:[4,1],about:[3,1,4],dec:3,root:3,update_uri:1,curlhttpclient:5,featur:[0,4,3],chang:[3,4],quickstart:3,creat:[3,5],operform:[],pass:1,anywher:2,indic:3,edfault:[],packag:2,"default":[1,5],file:3,tabl:3,need:[2,5,1,3],revis:1,curl:5,"__init__":5,probabl:[4,1],result:[3,1,4],alwai:2,headput:3,develop:[3,2],welcom:[3,5],want:[0,1,5],author:1,perform:[0,5,1,3],titl:1,self:5,add_password:5,header:[0,1,5],restourceresult:4,snippet:1,also:[2,1,5],when:[4,1,5],other:[4,1],read:0,resourcenotfound:1,which:[4,1,5],subdirectori:2,test:[1,5],command:2,you:[0,1,2,3,4,5],document:[0,3],simpl:[3,1],tutorial:0,complet:[3,4],"5roqe9xtz7lcclgzoqs4ip":[0,1],http:[0,1,2,3,4,5],though:5,our:[3,2],cach:5,clone:[2,1],object:[1,5],urllib2:[1,5],returne:[],password_mgr:5,most:2,attempt:[4,1],rais:[4,1],improv:4,authentif:[1,5],respons:[4,1,5],"class":[3,1],urllib2httpcli:5,recent:2,bitbucket:[3,2],don:5,ani:[1,5],bug:3,directori:2,doc:0,later:2,descript:[0,1],usag:[0,1],given:1,http_code:[4,1],receiv:[4,1],depth:0,exampl:[0,5,1,4],add_credenti:5,thi:[0,1,2,3,4,5],choos:5,everyth:3,usual:4,parameterss:1,make:[2,1,3],httplib2:[1,5]},titles:["Getting Started","Resource","Installation","Welcome to python-restclient&#8217;s documentation!","What&#8217;s New in python-restclient 1.0","HTTP Clients"],modules:{restclient:1},descrefs:{"restclient.RestClient":{httpclient:[1,3]},"restclient.http.Urllib2HTTPClient":{"__init__":[5,0]},"restclient.http.HTTPClient":{request:[5,0]},"restclient.http":{createHTTPClient:[5,2],setDefaultHTTPClient:[5,2],HTTPLib2HTTPClient:[5,1],CurlHTTPClient:[5,1],Urllib2HTTPClient:[5,1],getDefaultHTTPClient:[5,2],HTTPClient:[5,1]},"restclient.Resource":{uri:[1,3],httpclient:[1,3]},"restclient.rest.Resource":{head:[1,0],get:[1,0],clone:[1,0],"__call__":[1,0],put:[1,0],post:[1,0],update_uri:[1,0],"delete":[1,0]},"restclient.rest.RestClient":{head:[1,0],get:[1,0],put:[1,0],post:[1,0],make_request:[1,0],"delete":[1,0]},"restclient.rest":{Resource:[1,1],RestClient:[1,1],Unauthorized:[1,4],ResourceResult:[1,1],ResourceNotFound:[1,4],RequestFailed:[1,4]}},filenames:["gettingstarted","resource","installation","index","whatsnew","httpclient"]})
    
    installation
    gettingstarted
+   whatsnew
 
 .. _api:
 

docs/resource.txt

     >>> res = Resource('http://friendpaste.com')
     >>> res.get('/5rOqE9XTz7lccLgZoQS4IP',headers={'Accept': 'application/json'})
     '{"snippet": "hi!", "title": "", "id": "5rOqE9XTz7lccLgZoQS4IP", "language": "text", "revision": "386233396230"}'
-
+    >>> res.get('/5rOqE9XTz7lccLgZoQS4IP',headers={'Accept': 'application/json'}).http_code
+    200
 
 Resource class
 --------------
 
     .. automethod:: restclient.rest.RestClient.make_request
 
+ResourceResult class
+--------------------
 
+.. autoclass:: restclient.rest.ResourceResult
+ 
 Exceptions
 ----------
 

restclient/rest.py

     >>> res = Resource('http://friendpaste.com')
     >>> res.get('/5rOqE9XTz7lccLgZoQS4IP',headers={'Accept': 'application/json'})
     '{"snippet": "hi!", "title": "", "id": "5rOqE9XTz7lccLgZoQS4IP", "language": "text", "revision": "386233396230"}'
-
-
+    >>> res.get('/5rOqE9XTz7lccLgZoQS4IP',headers={'Accept': 'application/json'}).http_code
+    200
 """
 from urllib import quote, urlencode
 
 class ResourceResult(str):
     """ result returned by `restclient.rest.RestClient`.
     
-    you can get result like any string and  status code by result.http_code, 
-    or see anything about the response via e.response. For example, the entire 
-    result body is resulte.response.body.
+    you can get result like as string and  status code by result.http_code, 
+    or see anything about the response via result.response. For example, the entire 
+    result body is result.response.body.
 
     .. code-block:: python
 
 
 setup(
     name = 'py-restclient',
-    version = '0.21',
+    version = '1.0',
     description = 'Python REST client',
     long_description = \
 """A simple REST client for Python, inspired by the microframework (Camping, Sinatra) style of specifying actions: get, put, post, delete.""",
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.