Last active
August 29, 2015 14:20
-
-
Save wkentdag/4efeb5381601306c82f8 to your computer and use it in GitHub Desktop.
sup api from the command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Creating a new user: | |
curl -X POST 'http://localhost:3000/users' # development monde | |
curl -X POST 'http://localhost:3000/users' -d 'first_name=will&last_name=kd&phone=123456' # production mode | |
Creating a new status: | |
curl -X POST 'http://localhost:3000/status' -d 'fake_owner_id=1' # development mode | |
curl -X POST 'http://localhost:3000/status' -d 'owner_id=6&longitude=666&latitude=111' # production mode | |
Granting a user permission to view a status: | |
curl -X POST 'http://localhost:3000/status/:id/viewers' -d 'user_id=6' # :id = valid status id | |
Making a friend request: | |
curl -X POST 'http://localhost:3000/requests' -d 'user_id=2&requested_id=5' | |
Approving a friend request: | |
curl -X POST 'http://localhost:3000/users/:id/friends' -d 'friend_id=3' # :id = valid UID | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment