Difference between revisions of "Ticktock:API"

From RadonWiki
Jump to: navigation, search
(Created page with "API Methods <pre><nowiki> POST /auth/login GET /auth/user GET shifts/search?{query} DELETE auth/token </nowiki></pre> Examples using CURL and the development API...")
 
m
Line 1: Line 1:
 
API Methods
 
API Methods
  
<pre><nowiki>
+
<syntaxhighlight lang="rest">
 
POST /auth/login       
 
POST /auth/login       
 
GET /auth/user
 
GET /auth/user
 
GET shifts/search?{query}
 
GET shifts/search?{query}
 
DELETE auth/token     
 
DELETE auth/token     
</nowiki></pre>
+
</syntaxhighlight>
  
 
Examples using CURL and the development API
 
Examples using CURL and the development API
  
<pre><nowiki>
+
<syntaxhighlight lang="sh">
 
echo '{"email":"frodo@ticktock.nz","password":"frodo", "device":"Android Emulator"}' \
 
echo '{"email":"frodo@ticktock.nz","password":"frodo", "device":"Android Emulator"}' \
 
  | curl -d @- -X POST "https://api-dev.ticktock.nz/auth/login"
 
  | curl -d @- -X POST "https://api-dev.ticktock.nz/auth/login"
Line 19: Line 19:
  
 
curl "https://api-dev.ticktock.nz/auth/token" -X DELETE -H "Authorization: AAAA"
 
curl "https://api-dev.ticktock.nz/auth/token" -X DELETE -H "Authorization: AAAA"
</nowiki></pre>
+
</syntaxhighlight>

Revision as of 15:11, 13 April 2016

API Methods

POST /auth/login      
GET /auth/user
GET shifts/search?{query}
DELETE auth/token

Examples using CURL and the development API

echo '{"email":"frodo@ticktock.nz","password":"frodo", "device":"Android Emulator"}' \
 | curl -d @- -X POST "https://api-dev.ticktock.nz/auth/login"

curl "https://api-dev.ticktock.nz/auth/user" -H "Authorization: AAAA"

curl "https://api-dev.ticktock.nz/shifts/search?fromDate=2016-03-01&toDate=2016-03-07" -H "Authorization: AAAA"

curl "https://api-dev.ticktock.nz/auth/token" -X DELETE -H "Authorization: AAAA"