{"swagger":"2.0","info":{"description":"This is the 404-not-found team's API\n","version":"1.0.0","title":"404-not-found API","contact":{"email":"cbros@seas.upenn.edu"}},"tags":[{"name":"Sign up"},{"name":"Log in"},{"name":"User"},{"name":"Post"}],"paths":{"/signup":{"post":{"tags":["Sign up"],"summary":"Sign up a new user","operationId":"addPet","consumes":["application/json"],"parameters":[{"in":"body","name":"username","description":"Username of the new user","required":true,"schema":{}},{"in":"body","name":"email","description":"Email of the new user","required":true,"schema":{}},{"in":"body","name":"password","description":"Password of the new user","required":true,"schema":{}}],"responses":{"201":{"description":"User created"},"400":{"description":"Missing input"},"422":{"description":"Invalid input"},"500":{"description":"Server error"}}}},"/login":{"post":{"tags":["Log in"],"summary":"Log in a user","consumes":["application/json"],"parameters":[{"in":"body","name":"username","description":"Username of the new user","required":true,"schema":{}},{"in":"body","name":"email","description":"Email of the new user","required":true,"schema":{}},{"in":"body","name":"password","description":"Password of the new user","required":true,"schema":{}}],"responses":{"201":{"description":"User created"},"400":{"description":"Missing input"},"422":{"description":"Invalid input"},"500":{"description":"Server error"}}}},"/like":{"post":{"tags":["User"],"summary":"Like a post","description":"This can only be done by the logged in user.","operationId":"like","produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"postID","description":"ID of the post being liked","required":true,"schema":{}},{"in":"body","name":"username","required":true,"schema":{}}],"responses":{"default":{"description":"successful operation"}}}},"/unlike":{"post":{"tags":["User"],"summary":"Unlike a post","description":"This can only be done by the logged in user.","operationId":"unlike","produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"postID","description":"ID of the post being liked","required":true,"schema":{}},{"in":"body","name":"username","description":"User liking the post","required":true,"schema":{}}],"responses":{"default":{"description":"successful operation"}}}},"/follow":{"post":{"tags":["User"],"summary":"Follow a user","description":"This can only be done by the logged in user.","operationId":"follow","produces":["application/json"],"parameters":[{"in":"body","name":"postID","description":"ID of the post being liked","required":true,"schema":{}},{"in":"body","name":"username","description":"User liking the post","required":true,"schema":{}}],"responses":{"default":{"description":"successful operation"}}}},"/unfollow":{"post":{"tags":["User"],"summary":"Unfollow a user","description":"This can only be done by the logged in user.","operationId":"unfollow","parameters":[{"in":"path","name":"username","type":"string","description":"User that unfollows","required":true},{"in":"path","name":"friend","type":"string","description":"User that is unfollowed","required":true}],"responses":{"default":{"description":"successful operation"}}}},"/accept":{"post":{"tags":["User"],"summary":"Accept a follow request","description":"This can only be done by the logged in user.","operationId":"accept","produces":["application/json"],"parameters":[{"in":"path","name":"username","type":"string","description":"User that accepts follow request","required":true},{"in":"path","name":"follower","type":"string","description":"User that follows","required":true}],"responses":{"default":{"description":"successful operation"}}}},"/user/{username}":{"get":{"tags":["User"],"summary":"Get user by user name","operationId":"getUserByName","produces":["application/json","application/xml"],"parameters":[{"name":"username","in":"path","description":"The username that needs to be fetched","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}},"put":{"tags":["User"],"summary":"Update user","operationId":"updateUser","produces":["application/json"],"parameters":[{"name":"username","in":"path","description":"The username that needs to be updated","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}},"delete":{"tags":["User"],"summary":"Delete user by username","operationId":"deleteUser","produces":["application/json"],"parameters":[{"name":"username","in":"path","description":"The username that needs to be deleted","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/users":{"get":{"tags":["User"],"summary":"Get all users","operationId":"getUsers","produces":["application/json"],"responses":{"default":{"description":"successful operation"}}}},"/searchusers":{"get":{"tags":["User"],"summary":"Get all users","operationId":"searchUsers","produces":["application/json"],"parameters":[{"name":"username","in":"path","description":"The user searching","required":true,"type":"string"},{"name":"term","in":"path","description":"The term to search","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/followersuggestions":{"get":{"tags":["User"],"summary":"Get all users","operationId":"followerSuggestions","produces":["application/json"],"parameters":[{"name":"username","in":"path","description":"The user to find suggestions for","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/privacy":{"put":{"tags":["User"],"summary":"Get all users","operationId":"privacy","produces":["application/json"],"parameters":[{"name":"username","in":"path","description":"The user to toggle privacy for","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/postpicture":{"post":{"tags":["Post"],"summary":"Post a picture","operationId":"postPicture","produces":["application/json"],"parameters":[{"name":"caption","in":"body","description":"The caption of the post","required":true,"schema":{}}],"responses":{"default":{"description":"successful operation"}}}},"/updatePost":{"put":{"tags":["Post"],"summary":"Post a picture","operationId":"updatePost","produces":["application/json"],"parameters":[{"name":"postID","in":"path","description":"The ID of the post to update","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/post":{"delete":{"tags":["Post"],"summary":"Remove a post","operationId":"removePost","produces":["application/json"],"parameters":[{"name":"postID","in":"path","description":"The post ID to be removed","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/posts":{"get":{"tags":["Post"],"summary":"Get feed posts","operationId":"getPosts","produces":["application/json"],"parameters":[{"name":"username","in":"path","description":"The username of the user whose feed is being requested","required":true,"type":"string"},{"name":"num","in":"path","description":"The number of posts requested","required":true,"type":"integer"}],"responses":{"default":{"description":"successful operation"}}}},"/addComment":{"post":{"tags":["Post"],"summary":"Add commment to a post","operationId":"addComment","produces":["application/json"],"parameters":[{"name":"postID","in":"path","description":"The ID of the post to comment on","required":true,"type":"string"},{"name":"username","in":"path","description":"The user adding the comment","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/editComment":{"put":{"tags":["Post"],"summary":"Edit commment on a post","operationId":"editComment","produces":["application/json"],"parameters":[{"name":"postID","in":"path","description":"The ID of the post to comment on","required":true,"type":"string"},{"name":"username","in":"path","description":"The user adding the comment","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/comment":{"delete":{"tags":["Post"],"summary":"Delete commment on a post","operationId":"deleteComment","produces":["application/json"],"parameters":[{"name":"postID","in":"path","description":"The ID of the post","required":true,"type":"string"},{"name":"commentID","in":"path","description":"The ID of the comment","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/addtag":{"post":{"tags":["Post"],"summary":"Add tag to some user","operationId":"addtag","produces":["application/json"],"parameters":[{"name":"postID","in":"path","description":"The ID of the post","required":true,"type":"string"},{"name":"username","in":"path","description":"The user being tagged","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/removetag":{"post":{"tags":["Post"],"summary":"Remove a tag to a user","operationId":"removeTag","produces":["application/json"],"parameters":[{"name":"postID","in":"path","description":"The ID of the post","required":true,"type":"string"},{"name":"username","in":"path","description":"The user that had been tagged","required":true,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}}},"schemes":["https","http"],"host":"virtserver.swaggerhub.com","basePath":"/CIS557-404-not-found/404-Not-Found-API/1.0.0"}