mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-22 08:46:11 +01:00
changes api description to follow solution in #738
This commit is contained in:
parent
12d3b8eeee
commit
4139a6bc82
1 changed files with 10 additions and 10 deletions
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd \
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
<%= home_url %>contexts.xml
|
||||
>> <?xml version="1.0" encoding="UTF-8"?>
|
||||
<contexts>...</contexts>
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd \
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
<%= home_url %>contexts/51.xml
|
||||
>> <?xml version="1.0" encoding="UTF-8"?>
|
||||
<context>...</context>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd \
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
<%= home_url %>contexts/51/todos.xml
|
||||
>> <?xml version="1.0" encoding="UTF-8"?>
|
||||
<todos type="array">...</todos>
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
|
||||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd \
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
-d "project[name]=Build a treehouse for the kids" \
|
||||
<%= home_url %>projects.xml -i
|
||||
>> HTTP/1.1 201 Created
|
||||
|
|
@ -85,7 +85,7 @@ Location: <%= home_url %>projects/65.xml
|
|||
|
||||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd \
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
-d "todo[description]=Model treehouse in SketchUp&todo[context_id]=2&todo[project_id]=65" \
|
||||
<%= home_url %>todos.xml -i
|
||||
>> HTTP/1.1 201 Created
|
||||
|
|
@ -98,7 +98,7 @@ Location: <%= home_url %>todos/452.xml
|
|||
|
||||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd -X PUT \
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" -X PUT \
|
||||
-d "todo[notes]=use maple texture" \
|
||||
<%= home_url %>todos/452.xml -i
|
||||
>> HTTP/1.1 200 OK
|
||||
|
|
@ -119,7 +119,7 @@ Location: <%= home_url %>todos/452.xml
|
|||
|
||||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd -X PUT \
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" -X PUT \
|
||||
<%= home_url %>todos/452/toggle_check.xml -i
|
||||
>> HTTP/1.1 200 OK
|
||||
...
|
||||
|
|
@ -140,7 +140,7 @@ Location: <%= home_url %>todos/452.xml
|
|||
|
||||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd -X DELETE \
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" -X DELETE \
|
||||
<%= home_url %>todos/452.xml -i
|
||||
>> HTTP/1.1 200 OK
|
||||
...
|
||||
|
|
@ -159,7 +159,7 @@ Location: <%= home_url %>todos/452.xml
|
|||
|
||||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd \
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
<%= home_url %>contexts/2/todos.xml
|
||||
>> <?xml version="1.0" encoding="UTF-8"?>
|
||||
<nil-classes type="array"/>
|
||||
|
|
@ -215,4 +215,4 @@ irb(main):003:0>
|
|||
<li><code>...</code> indicates that unimportant bits of response data have been removed to eliminate noise from the documentation</li>
|
||||
</ul>
|
||||
|
||||
<p>All examples make use of <a href="http://en.wikipedia.org/wiki/CURL">cURL</a> .</p></div>
|
||||
<p>All examples make use of <a href="http://en.wikipedia.org/wiki/CURL">cURL</a> .</p></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue