Roxanne is a college student and she wants to spend her weekends exploring the outdoors more.
She learns about the app PeakPeeps and decides to add herself as a user. POST /users/create_account
She knows her friend Bob is on the app, and adds him as a follower. POST /users/add_follower. Alas, Bob lied and he actually hasn’t been on the app and has been lazy.
She is sure that her friend Fred is on the app and adds him as a follower. POST /users/add_follower.
They got into a fight and Roxanne doesn’t want to be friends with Fred since Fred stole Roxanne’s potions and gets rid of him as a follower. POST /users/remove_follower
Response [500 Error writing what should be returned]
{
“OK”
}
Example workflow
Joe and Jim’s Gym wants to promote PeakPeeps and healthy habits.
Joe registers the business by calling PUT/business/add
And adds coupons PUT /coupons/add
Sammy sees the coupons and wants to buy their coupon on milkshakes POST /peepcoins/purchase/coupon. Unfortunately, Sammy is lazy and doesn’t have any routes added and therefore unable to purchase the coupon.
curl -X 'PUT' \
'https://peak-peeps.onrender.com/coupons/add' \
-H 'accept: application/json' \
-H 'access_token: PeepCoins123!' \
-H 'Content-Type: application/json' \
-d '{
"business_id": 3, [NOTE: didn’t know what business_id to put since not mentioned anywhere]
"name": "Buy Protein",
"cost": 20
}'
Response [500 Error writing what should be returned]
{
“OK”
}
Calling PUT /coupons/add
curl -X 'PUT' \
'https://peak-peeps.onrender.com/coupons/add' \
-H 'accept: application/json' \
-H 'access_token: PeepCoins123!' \
-H 'Content-Type: application/json' \
-d '{
"business_id": 3, [NOTE: didn’t know what business_id to put since not mentioned anywhere]
"name": "Buy Milkshakes",
"cost": 20
}'
Response [500 Error writing what should be returned]
{
“OK”
}
Calling POST /peepcoins/purchase/coupon
curl -X 'POST' \
'https://peak-peeps.onrender.com/peepcoins/purchase/coupon' \
-H 'accept: application/json' \
-H 'access_token: PeepCoins123!' \
-H 'Content-Type: application/json' \
-d '{
"coupon_id": 1, [NOTE: didn’t know how to get either of these values]
"user_id": 1
}'
Response [500 Error writing what should be returned]
{
“OK”
}
Example workflow
Jack and Jill are attempting to run a pyramid scheme and are trying to post as many routes as possible to get money to buy coupons.
They both create accounts using POST /users/create_account
They then add each other as best friends POST /users/add_follower
They start adding routes POST /routes/add
They then get all the popular routes and begin visiting all of the ones in SLO GET /routes/popular
Example workflow
Roxanne is a college student and she wants to spend her weekends exploring the outdoors more.
She learns about the app PeakPeeps and decides to add herself as a user.
POST /users/create_account
She knows her friend Bob is on the app, and adds him as a follower.POST /users/add_follower
. Alas, Bob lied and he actually hasn’t been on the app and has been lazy. She is sure that her friend Fred is on the app and adds him as a follower.POST /users/add_follower
. They got into a fight and Roxanne doesn’t want to be friends with Fred since Fred stole Roxanne’s potions and gets rid of him as a follower.POST /users/remove_follower
Testing results
POST /users/create_account
POST /users/add_follower
POST /users/add_follower
POST /users/remove_follower
Example workflow
Joe and Jim’s Gym wants to promote PeakPeeps and healthy habits.
Joe registers the business by calling
PUT/business/add
And adds couponsPUT /coupons/add
Sammy sees the coupons and wants to buy their coupon on milkshakesPOST /peepcoins/purchase/coupon
. Unfortunately, Sammy is lazy and doesn’t have any routes added and therefore unable to purchase the coupon.Testing results
PUT/business/add
PUT /coupons/add
PUT /coupons/add
POST /peepcoins/purchase/coupon
Example workflow
Jack and Jill are attempting to run a pyramid scheme and are trying to post as many routes as possible to get money to buy coupons.
They both create accounts using
POST /users/create_account
They then add each other as best friendsPOST /users/add_follower
They start adding routesPOST /routes/add
They then get all the popular routes and begin visiting all of the ones in SLOGET /routes/popular
Testing results
POST /users/create_account
POST /users/create_account
POST /users/add_follower
POST /routes/add
POST /routes/add
GET /routes/followers
GET /routes/popular