Open Corbyn-Rasque opened 2 days ago
Corbyn wants to start tracking all of the books he reads, and to give them reviews. He's also more than content to speak in the third person. He finds Personal Media Tracker on GitHub—the place he searches for all new and robust software. He creates an account first, and then finds out about Catalogs. He creates a new Catalog after thinking of an utterly unique name that he's sure no one has ever thought to name a Catalog after, and begins adding books. Since he's an absolute pro at reading already, he starts with heavy hitters like The Cat In the Hat
by Dr. Seuss
and Pale Fire
by Vladimir Nabokov
, giving them reviews and entering in metadata. He now wants to search what he's read, so he searches his catalog twice (once for each book) and verifies they're there.
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/create?name=Corbyn' \
-H 'accept: application/json' \
-d ''
"OK"
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/17/catalogs' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "Corbyn'\''s Books",
"type": "books",
"private": true
}'
"OK"
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/17/catalogs/Corbyn%27s%20Books/book_entries' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"title": "The Cat in the Hat (The Cat in the Hat, #1)",
"author": "Dr. Seuss",
"opinion": "Literally life-changing.",
"rating": 3,
"date_read": "2024-11-12",
"read_again": false,
"recommend": false,
"private": false
}'
"OK"
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/17/catalogs/Corbyn%27s%20Books/book_entries' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"title": "Pale Fire",
"author": "Vladimir Nabokov",
"opinion": "Kinda ok, but like the author should get over himself. Dude spends too much time in the attic.",
"rating": 9,
"date_read": "2024-11-12",
"read_again": true,
"recommend": true,
"private": false
}'
"OK"
curl -X 'GET' \
'https://personal-media-tracker.onrender.com/user/{user_id}/catalogs/{catalog_name}/book_entries/search' \
-H 'accept: application/json'
"OK"
[ This endpoint doesn't seem to have been written ]
curl -X 'GET' \
'https://personal-media-tracker.onrender.com/user/{user_id}/catalogs/{catalog_name}/book_entries/search' \
-H 'accept: application/json'
[ This endpoint doesn't seem to have been written ]
"OK"
Lucas is a gamer's gamer, and takes his responsibility of reviewing & rating games for the sake of the community very seriously. He loves leaving Steam reviews for the publicity, but the up-and-coming Personal Media Tracker has his eye, given the insane user growth. He creates an account and logs in, and begins rating games. He adds a rating for his all-time favorite game, Just Dance 2016
. He shares his username with his best friend, Ozcar, so Ozcar can create an account and follow Lucas. Lucas makes sure his catalog is public, and makes sure to recommend Just Dance 2016
. Ozcar then gets recommendations from his best friend Lucas to see what great games he can recommend him, and sees Just Dance 2016. Ozcar is elated, and goes to play Just Dance 2016
so he, too can rate it.
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/create?name=Lucas%20Pierce' \
-H 'accept: application/json' \
-d ''
"OK"
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/36/catalogs' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "Pierce'\''s Pastimes",
"type": "games",
"private": false
}'
"OK"
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/36/catalogs/Pierce%27s%20Pastimes/game_entries' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"title": "Just Dance 2016",
"year": 2015,
"opinion": "Sometimes the only way I can unwind anymore is shuffling to Balkan Blast Remix by Angry Birds. This game is a godsend!",
"rating": 69,
"hours_played": 9223372036854775807,
"play_again": true,
"recommend": true,
"private": false
}'
"OK"
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/create?name=Ozcar%20Cayetano' \
-H 'accept: application/json' \
-d ''
"OK"
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/37/social?user_name=Lucas%20Pierce' \
-H 'accept: application/json' \
-d ''
"OK"
curl -X 'GET' \
'https://personal-media-tracker.onrender.com/user/36/social/Lucas%20Pierce/catalogs/Pierce%27s%20Pastimes/recommendations' \
-H 'accept: application/json'
[]
Recommendation does not seem to work, despite successful follow & private being set to false on both Catalog & Game Entry.
Steven Spielberg is something of a movie nut, and wants to keep a list of all of the movies he's made and what he thinks of them. He's heard whispers of a new IMDB replacement on GitHub called Personal Media Tracker and just has to check it out for himself. He makes an account, creates a new private Catalog called <3 Spielberg's Movies <3
and adds his 2008 hit classic Indiana Jones and the Kingdom of the Crystal Skull
. He rates it, but on a second watching rethinks his entire outlook on the movie and no longer likes the movie at all, seeing it for the garbage it is. He updates his rating and then vows to never watch or make another movie again, promptly deleting his account and riding off into the sunset with a few hundred million dollars.
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/create?name=Steven%20Spielberg' \
-H 'accept: application/json' \
-d ''
"OK"
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/38/catalogs' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "<3 Spielberg'\''s Movies <3",
"type": "movies",
"private": true
}'
"OK"
curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/38/catalogs/%3C3%20Spielberg%27s%20Movies%20%3C3/movie_entries' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"title": "Indiana Jones and the Kingdom of the Crystal Skull",
"year": 2008,
"opinion": "Honestly some of my strongest work. Having Indy survive an atomic blast in a lead-lined refrigerator is some of my best thinking since the big rock thing in the first movie.",
"rating": 420,
"date_seen": "2024-11-12",
"watch_again": true,
"recommend": true,
"private": true
}'
"OK"
curl -X 'PUT' \
'https://personal-media-tracker.onrender.com/user/38/catalogs/%3C3%20Spielberg%27s%20Movies%20%3C3/movie_entries/Indiana%20Jones%20and%20the%20Kingdom%20of%20the%20Crystal%20Skull' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"opinion": "Holy gravy, what was I smoking???",
"rating": 1,
"date_seen": "2024-11-12",
"watch_again": false
}'
"OK"
curl -X 'DELETE' \
'https://personal-media-tracker.onrender.com/user/38' \
-H 'accept: application/json'
"OK"
Example User Workflows
Workflow 1
Paul, an avid Pokemon card collector, logs in to the personal media tracker to create a new catalog of his entire Pokemon collection. Paul logins into his account using
GET /user/login
and successfully enters his username to login, he then callsPOST /users/{user_id}/catalog
to create a new catalog for his Pokemon cards. Paul finally usesPOST users/{user_id}/catalog/{catalog_id}/entries
for every card in his collection to add it to his media tracker. Paul knows several other Pokemon collectors using the personal media tracker, Paul callsPOST /users/{user_id}/social
and passes in the name of his friend Connor. Since Connor exists on the site, his user name is found and returned to Paul's follower list.Test Results
User Login
Request
Response
Create a Catalog
Request
Response
Create Catalog Entry (1)
Request
Response
Create Catalog Entry (2)
Request
Response
Get Followers
Request
Response
Workflow 2
On Saturday, Jonathan is hoping to relax after a busy week by watching a movie. He is unsure of what to watch, but he knows about the personal media tracker that his friends use to write opinions and recommendations for movies that they have seen. Jonathan creates an account for the personal media tracker by calling
POST /user/create
and immediately follows his friend Aiden by callingPOST user/{user_id}/social
passing Aiden’s account name. Jonathan usesGET user/{user_id}/social/{follower_id}/catalogs
to get and browse a list of Aiden’s catalogs. Jonathan finds a public catalog titled “my_movies”. Finally, Jonathan callsGET user/{user_id}/social/{user_name}/catalogs/{catalog}/recommendations
on Aiden’s “my_movies” catalog to see the list of movie entries that Aiden personally recommends. Jonathan sees “Cars” on Aiden’s list along with a favorable rating and opinion and decides to watch that to end his chill Saturday evening.Test Results
Create User
Request
Response
Create Following
Request
Response
Get Follower Catalogs
Request
Response
Get Follower Catalog Recommendations
Request
Response
Workflow 3
Connor hears about a new personal media tracker and wants to use it to keep track of the video games he has played. He creates an account by calling
POST /user/create
. Connor logs in callingGET /user/login
. After that, he creates a catalog for his games by callingPOST user/{user_id}/catalog
and passing in the title “my_games” and the catalog type of “games”. He then creates an entry usingPOST user/{user_id}/catalogs/{catalog_name}/game_entries
. He creates an entry for “Omori” with a rating of 8/10, he played for 200 hours. After creating the entry, he thinks to himself that “Omori” is actually the greatest psychological horror game and wants to change his rating. He callsPUT /user/{user_id}/catalogs/{catalog_name}/entries/{entry_title}
and passes a new rating of 10/10.Test Results
Create User
Request
Response
Create Following
Request
Response
Get User Catalogs
Request
Response
Get Catalog Game Entries
Request
Response
Add User Game Entry
Request
Response