Each separate set of APIs are grouped into separate .py files based on objects. For example, all of the HTTP calls relating to users (creating new, updating info, etc)
are grouped into users.py
. Similarly, all of the HTTP calls for listings (creating new, updating info, uploading pics) in the database are grouped into listings.py
.
To signal these functional distinctions in the methods, each file is given a special HTTP extension. For example, all API calls relating to users should be sent to http://bygo-client-server.appspot.com/users/*
where *
is the name of desired function. See the documentation in the Workflows section for more exmaples.
################################################# ################################################# ################################################# ############## TODO: FIX WORKFLOWS ############## ################################################# ################################################# #################################################
appcfg.py -A molten-unison-112921 update app.yaml
curl -H "Content-Type: application/json" -X POST -d @json.txt http://molten-unison-112921.appspot.com/user/create ###################################################
########### USER FUNCTIONS ##############
curl -H "Content-Type: application/json" -X POST -d "{\"first_name\":\"JJ\", \"last_name\":\"Qi\", \"email\":\"jj@bygo.io\", \"phone_number\":\"4569871231\", \"password\":\"hello_world\", \"signup_method\":\"Phone Number\", \"facebook_id\":\"\"}" http://molten-unison-112921.appspot.com/user/create
curl -X DELETE http://molten-unison-112921.appspot.com/user/deactivate/user_id=5717495361044480
curl -X DELETE http://molten-unison-112921.appspot.com/user/delete_from_search/user_id=5706163895140352
curl -X POST -d {} http://molten-unison-112921.appspot.com/user/reactivate/user_id=5717495361044480
curl -H "Content-Type: application/json" -X POST -d "{\"first_name\":\"Sayan\", \"last_name\":\"Roychowdhury\", \"email\":\"sayan@bygo.io\", \"phone_number\":\"0123456789\"}" http://molten-unison-112921.appspot.com/user/update/user_id=5634387206995968
curl -X POST -F "filename=profile_picture.jpg" -F "userfile=@C:/Users/Sayan/Desktop/tumblr_mzzprh5Rxw1t41r5fo1_500.png" http://molten-unison-112921.appspot.com/user/create_user_image/user_id=5750790484393984
curl -X DELETE http://molten-unison-112921.appspot.com/user/delete_user_image/user_id=5634387206995968
curl http://molten-unison-112921.appspot.com/user/user_id=5750790484393984
curl -H "Content-Type: application/json" -X POST -d @test_jsons/new_delivery_address.json http://molten-unison-112921.appspot.com/delivery_address/create/user_id=5722467590995968
curl -X DELETE http://molten-unison-112921.appspot.com/delivery_address/delete/user_id=5634387206995968
curl http://molten-unison-112921.appspot.com/delivery_address/get/user_id=5634387206995968
curl http://molten-unison-112921.appspot.com/verification/phone_number/send_code/user_id=5649521866440704
curl -H "Content-Type: application/json" -X POST -d "{\"verification_code\":\"547517\", \"user_id\":\"5649521866440704\"}" http://molten-unison-112921.appspot.com/verification/phone_number/check_code
########### LISTING FUNCTIONS ##############
curl -H "Content-Type: application/json" -X POST -d "{\"user_id\":\"5649521866440704\", \"type_id\":\"5639574185312256\"}" http://molten-unison-112921.appspot.com/listing/create
curl http://molten-unison-112921.appspot.com/listing/suggested_rates/total_value=95.5
curl -X DELETE http://molten-unison-112921.appspot.com/listing/delete/listing_id=5727389891952640
curl -H "Content-Type: application/json" -X POST -d "{\"category_id\":\"5713573250596864\", \"name\":\"Knockoff Headphones\", \"item_description\":\"I AM A LIAR\", \"total_value\":\"75\", \"hourly_rate\":\"7.5\", \"daily_rate\":\"15\", \"weekly_rate\":\"30\", \"status\":\"Unlisted\"}" http://molten-unison-112921.appspot.com/listing/update/listing_id=5749563331706880
curl -X POST -F "filename=ps4.jpg" -F "userfile=@C:/Users/Sayan/Desktop/ps4-634334.jpg" http://molten-unison-112921.appspot.com/listing/create_listing_image/listing_id=5747610597982208
curl -X DELETE http://molten-unison-112921.appspot.com/listing/delete_listing_image/path=5682617542246400/40mmOLChntSglLp2686GovBlkSnp-2.jpg
curl http://molten-unison-112921.appspot.com/listing/listing_id=5659118702428160
curl http://molten-unison-112921.appspot.com/listing/get_users_listings/user_id=5634387206995968
curl http://molten-unison-112921.appspot.com/listing/get_users_rented_listings/user_id=5634387206995968
########### ITEM_TYPE FUNCTIONS ##############
curl -H "Content-Type: application/json" -X POST -d @test_jsons/item_type_list.json http://molten-unison-112921.appspot.com/item_type/load_data
curl -H "Content-Type: application/json" -X POST -d @test_jsons/new_item_type.json http://molten-unison-112921.appspot.com/item_type/create
curl -X DELETE http://molten-unison-112921.appspot.com/item_type/delete/item_type_id=5700735861784576
curl -H "Content-Type: application/json" -X POST -d "{\"tag\":\"Sony\"}" http://molten-unison-112921.appspot.com/item_type/create_tag/item_type_id=5681777339269120
curl -X DELETE http://molten-unison-112921.appspot.com/item_type/delete_tag/item_type_id=5681777339269120/tag=Sony
########### CONSISTENCY CHECK FUNCTIONS #############
curl -X DELETE http://molten-unison-112921.appspot.com/consistency_check/users
curl -X DELETE http://molten-unison-112921.appspot.com/consistency_check/listings
curl -X DELETE http://molten-unison-112921.appspot.com/consistency_check/item_types
########### ORDER FUNCTIONS #################
curl -H "Content-Type: application/json" -X POST -d @test_jsons/order.json http://molten-unison-112921.appspot.com/order/create
curl -X DELETE http://molten-unison-112921.appspot.com/order/cancel/order_id=5739238230327296
curl http://molten-unison-112921.appspot.com/order/order_id=5197794386116608
curl http://molten-unison-112921.appspot.com/get_users_orders/user_id=5634387206995968
curl http://molten-unison-112921.appspot.com/order/get_fillable/user_id=5634387206995968
curl -H "Content-Type: application/json" -X POST -d @test_jsons/offer.json http://molten-unison-112921.appspot.com/order/offer_listing
curl -H "Content-Type: application/json" -X POST -d @test_jsons/accepted_offer.json http://molten-unison-112921.appspot.com/order/accept_offer
curl -H "Content-Type: application/json" -X POST -d @test_jsons/declined_offer.json http://molten-unison-112921.appspot.com/order/decline_offer
########### MEETING LOCATION FUNCTIONS ##############
curl -H "Content-Type: application/json" -X POST -d "{\"google_places_id\":\"ChIJmc6iNkfXDIgRqE-VN6vAsbI\", \"name\":\"Home\", \"address\":\"502 E Springfield Ave, Champaign, IL 61820, USA\", \"is_private\":\"True\"}" http://molten-unison-112921.appspot.com/meeting_location/create/user_id=5752571553644544
curl -X DELETE http://molten-unison-112921.appspot.com/meeting_location/delete/location_id=5629652273987584
curl -H "Content-Type: application/json" -X POST -d "{\"google_places_id\":\"ChIJv5lMaT_XDIgRsEtHigVjhEY\", \"name\":\"McDonald's\", \"address\":\"502 E Springfield Ave, Champaign, IL 61820, USA\", \"is_private\":\"False\"}" http://molten-unison-112921.appspot.com/meeting_location/update/location_id=5688424874901504
########### ADVERTISED LISTINGS FUNCTIONS ############## curl http://molten-unison-112921.appspot.com/advertised_listings/snapshots/user_id=6288801441775616/radius=10
########### RENT EVENT FUNCTIONS ##############
curl -H "Content-Type: application/json" -X POST -d @json.txt http://molten-unison-112921.appspot.com/rent_event/propose/listing_id=5657382461898752/renter_id=5725851488354304
curl -H "Content-Type: application/json" -X POST -d "{\"time\":\"2016 03 20 15:30:00\", \"location_id\":\"5688424874901504\"}" http://molten-unison-112921.appspot.com/rent_event/accept/rent_event_id=5202656289095680
curl http://molten-unison-112921.appspot.com/rent_event/get_rent_events/user_id=5752571553644544
curl http://molten-unison-112921.appspot.com/rent_event/get_rent_event/rent_event_id=5202656289095680
########### MEETING EVENT FUNCTIONS ##############