forked from joblander/jland
/
examples.txt
17 lines (16 loc) · 1.73 KB
/
examples.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
curl -i -H"Content-Type:application/json" -d "{\"name\":\"position\",\"details\":\"position description\"}" http://joblander.herokuapp.com/users/1/positions.json #create a position for a user
curl -i http://joblander.herokuapp.com/users/1/positions.json # get all positions for a user
curl -i http://joblander.herokuapp.com/users/1/positions/2.json # get a position for a user
curl -i -XPUT -H"Content-Type:application/json" http://joblander.herokuapp.com/users/1/positions/2.json -d "{\"name\":\"position\",\"details\":\"position description\"}"
curl -i -XPUT -H"Content-Type:application/json" http://joblander.herokuapp.com/users/1/positions/2.json -d "{\"pstatus\":\"applied\"}"
curl -i -XPOST http://joblander.herokuapp.com/users/1/positions/2/related_emails.json -d "{\"guid\":\"sgagas\"}"
# using httpie:
http POST http://joblander.herokuapp.com/users/1/positions.json name=posi details="some details" details=det company=com comments=com app_link=link app_due_date=1/1/2012 # create a position
http GET http://joblander.herokuapp.com/users/1/positions.json # get all positions for a user
http GET http://joblander.herokuapp.com/users/1/positions/2.json # get a position for a user
http PUT http://joblander.herokuapp.com/users/1/positions/2.json name=posi details="some details" # update a position
http PUT http://joblander.herokuapp.com/users/1/positions/2.json pstatus=applied # update a position - change status
http PUT http://joblander.herokuapp.com/users/1/positions/2.json starred=true # update a position - star
http POST http://joblander.herokuapp.com/users/1/positions/2/related_emails.json guid=fh33k
http DELETE http://joblander.herokuapp.com/users/1/positions/2/related_emails/1.json
http DELETE http://joblander.herokuapp.com/users/1/positions/2.json