J-Dees / Personal-Media-Tracker

0 stars 0 forks source link

Test Results - Corbyn Rasque #8

Open Corbyn-Rasque opened 2 days ago

Corbyn-Rasque commented 2 days ago

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 calls POST /users/{user_id}/catalog to create a new catalog for his Pokemon cards. Paul finally uses POST 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 calls POST /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

curl -X 'GET' \
'https://personal-media-tracker.onrender.com/user/login?name=Paul' \
-H 'accept: application/json'

Response

{"user_id":7}

Create a Catalog

Request

curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/7/catalogs' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "Paul'\''s Pokemon",
"type": "other",
"private": false
}'

Response

"Catalog name already taken. Please choose another name."

Create Catalog Entry (1)

Request

curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/7/catalogs/Paul%27s%20Pokemon/other_entries' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"title": "Greninja ex 214/167",
"description": "As long as this Pokémon is on your Bench, prevent all damage done to this Pokémon by attacks (both yours and your opponent'\''s).",
"price": 305,
"quality": "Special Illustration Rare",
"date_obtained": "2024-10-09",
"recommend": true,
"private": false
}'

Response

"OK"

Create Catalog Entry (2)

Request

curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/7/catalogs/Paul%27s%20Pokemon/other_entries' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"title": "Mew ex 232/091",
"description": "Shiny Mew",
"price": 169,
"quality": "Special Illustration Rare",
"date_obtained": "2024-07-23",
"recommend": true,
"private": false
}'

Response

"OK"

Get Followers

Request

curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/7/social?user_name=Connor' \
-H 'accept: application/json' \
-d ''

Response

INTERNAL SERVER ERROR

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 calling POST user/{user_id}/social passing Aiden’s account name. Jonathan uses GET 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 calls GET 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

curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/create?name=Jonathan' \
-H 'accept: application/json' \
-d ''

Response

"Username already taken, please choose a different name."

Create Following

Request

curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user/8/social?user_name=Aiden' \
-H 'accept: application/json' \
-d ''

Response

Internal Server Error

Get Follower Catalogs

Request

curl -X 'GET' \
'https://personal-media-tracker.onrender.com/user/8/social/Aiden/catalogs' \
-H 'accept: application/json'

Response

{"detail":[{"loc":["query","following_name"],"msg":"field required","type":"value_error.missing"}]}

Get Follower Catalog Recommendations

Request

curl -X 'GET' \
'https://personal-media-tracker.onrender.com/user/11/social/Aiden/catalogs/my_movies/recommendations' \
-H 'accept: application/json'

Response

[{"movie_title":"Cars","year":2006,"date_seen":"2014-10-07","opinion":"Lightning McQueen is cool","rating":9.3,"watch_again":true,"recommend":true}]

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 calling GET /user/login. After that, he creates a catalog for his games by calling POST user/{user_id}/catalog and passing in the title “my_games” and the catalog type of “games”. He then creates an entry using POST 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 calls PUT /user/{user_id}/catalogs/{catalog_name}/entries/{entry_title} and passes a new rating of 10/10.

Test Results

Create User

Request

curl -X 'POST' \
'https://personal-media-tracker.onrender.com/user_functions/user/create?name=Connor' \
-H 'accept: application/json' \
-d ''

Response

{"detail":"Not Found"}

Create Following

Request

curl -X 'GET' \
'https://personal-media-tracker.onrender.com/user_functionsuser/login?name=Connor' \
-H 'accept: application/json' \
-d ''

Response

{"detail":"Not Found"}

Get User Catalogs

Request

curl -X 'POST' \
'https://personal-media-tracker.onrender.com/catalogsuser/14/catalogs' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"name": "my_games",
"type": "games",
"private": false }'

Response

{"detail":"Not Found"}

Get Catalog Game Entries

Request

curl -X 'POST' \
'https://personal-media-tracker.onrender.com/entriesuser/14/catalogs/%7Bcatalog_name%7D/game_entries?catalog_id=5' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"title": "Omori",
"opinion": "This game is great",
"rating": 8,
"hours_played": 200,
"play_again": true,
"recommend": true,
"private": true }'

Response

{"detail":"Not Found"}

Add User Game Entry

Request

curl -X 'PUT' \
'https://personal-media-tracker.onrender.com/entriesuser/14/catalogs/my_games/entries/Omori' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"opinion": "This is the best game ever made!",
"rating": 10.0,
"hours_played": 2500,
"play_again": true
}'

Response

{"detail":"Not Found"}
Corbyn-Rasque commented 2 days ago

Newly Created User Workflows

Workflow 1

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.

Test Results

Create Account

Request

curl -X 'POST' \
  'https://personal-media-tracker.onrender.com/user/create?name=Corbyn' \
  -H 'accept: application/json' \
  -d ''

Response

"OK"

Create Catalog

Request

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
}'

Response

"OK"

Add Book

Request

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
}'

Response

"OK"

Add Book

Request

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
}'

Response

"OK"

Search for Book

Request

curl -X 'GET' \
  'https://personal-media-tracker.onrender.com/user/{user_id}/catalogs/{catalog_name}/book_entries/search' \
  -H 'accept: application/json'

Response

"OK"

[ This endpoint doesn't seem to have been written ]

Search for Book

Request

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 ]

Response

"OK"

Workflow 2

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.

Test Results

Create Account

Request

curl -X 'POST' \
  'https://personal-media-tracker.onrender.com/user/create?name=Lucas%20Pierce' \
  -H 'accept: application/json' \
  -d ''

Response

"OK"

Create Catalog

Request

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
}'

Response

"OK"

Add Game

Request

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
}'

Response

"OK"

Create User

Request

curl -X 'POST' \
  'https://personal-media-tracker.onrender.com/user/create?name=Ozcar%20Cayetano' \
  -H 'accept: application/json' \
  -d ''

Response

"OK"

Follow User

Request

curl -X 'POST' \
  'https://personal-media-tracker.onrender.com/user/37/social?user_name=Lucas%20Pierce' \
  -H 'accept: application/json' \
  -d ''

Response

"OK"

Get Recommendations

Request

curl -X 'GET' \
  'https://personal-media-tracker.onrender.com/user/36/social/Lucas%20Pierce/catalogs/Pierce%27s%20Pastimes/recommendations' \
  -H 'accept: application/json'

Response

[]

Recommendation does not seem to work, despite successful follow & private being set to false on both Catalog & Game Entry.

Workflow 3

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.

Test Results

Create Account

Request

curl -X 'POST' \
  'https://personal-media-tracker.onrender.com/user/create?name=Steven%20Spielberg' \
  -H 'accept: application/json' \
  -d ''

Response

"OK"

Create Catalog

Request

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
}'

Response

"OK"

Add Movie

Request

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
}'

Response

"OK"

Update Movie Entry

Request

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
}'

Response

"OK"

Delete Account

Request

curl -X 'DELETE' \
  'https://personal-media-tracker.onrender.com/user/38' \
  -H 'accept: application/json'

Response

"OK"