Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
populating db in production mode
# Make a user
curl -X POST 'http://localhost:3000/users' -d 'first_name=Will&last_name=Test&phone=123456789'
# Make a status
curl -X POST 'http://localhost:3000/status' -d 'owner_id=1&longitude=100&latitude=100&duration=30'
# the above fields are all required. to add viewing permissions to users OTHER than the owner, add:
'&selectedFriends[]=2&selectedFriends[]=5' # etc
# and to add a 160char-max message, add:
'&message="hey there im awesome"'
# Issue a follow request (request access to view another user's statuses)
curl -X POST 'http://localhost:3000/requests' -d 'requested_id=11&user_id=37'
#result: {"result":"User 37 has requested 11"}
# Approve a follow request (grant another user access to view your statuses)
#id = user granting approval; #id2 = user requesting approval
curl -X POST 'http://localhost:3000/users/:id/friends' -d 'friend_id=:id2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment