{"swagger":"2.0","info":{"version":"1.0","title":"340API","description":"340API"},"paths":{"/signup":{"post":{"summary":"register new user","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"signUpRequest","description":"sign up request for signing up a new user","required":true,"schema":{"$ref":"#/definitions/SignUpRequest"}}],"responses":{"200":{"description":"successfully signed up","schema":{"$ref":"#/definitions/LoginResponse"}},"400":{"description":"user exist"}}}},"/login":{"post":{"summary":"login registered user","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"loginRequest","description":"login registered user","required":true,"schema":{"$ref":"#/definitions/LoginRequest"}}],"responses":{"200":{"description":"successfully logged in","schema":{"$ref":"#/definitions/LoginResponse"}},"400":{"description":"Invalid input"},"404":{"description":"User not found"}}}},"/logout":{"post":{"summary":"logout signed in user","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"logoutRequest","description":"logout signed in user","required":true,"schema":{"$ref":"#/definitions/LogoutRequest"}}],"responses":{"200":{"description":"successfully signed out","schema":{"$ref":"#/definitions/Response"}},"400":{"description":"bad request"}}}},"/postTweet":{"post":{"summary":"post new story of the user","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"tweetRequest","description":"post new story of the user","required":true,"schema":{"$ref":"#/definitions/TweetRequest"}}],"responses":{"200":{"description":"successfully posted story","schema":{"$ref":"#/definitions/TweetResponse"}},"400":{"description":"token expired"}}}},"/follow":{"post":{"summary":"follow other user","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"follow","description":"follow other user","required":true,"schema":{"$ref":"#/definitions/RelationshipRequest"}}],"responses":{"200":{"description":"successfully follow user","schema":{"$ref":"#/definitions/RelationshipResponse"}},"400":{"description":"bad request"},"404":{"description":"user not found"}}}},"/unfollow":{"post":{"summary":"unfollow other user","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"follow","description":"unfollow other user","required":true,"schema":{"$ref":"#/definitions/RelationshipRequest"}}],"responses":{"200":{"description":"successfully follow user","schema":{"$ref":"#/definitions/RelationshipResponse"}},"400":{"description":"bad request"},"404":{"description":"user not found"}}}},"/isRelated":{"get":{"summary":"determine if the user follower other user","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"isRelated","description":"determine if the user follower other user","required":true,"schema":{"$ref":"#/definitions/RelationshipRequest"}}],"responses":{"200":{"description":"source is related (not related) to the destination","schema":{"$ref":"#/definitions/RelationshipResponse"}},"400":{"description":"bad request"},"404":{"description":"user not found"}}}},"/getFollowing":{"get":{"summary":"get followees of the user","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"followingRequest","description":"get followees of the user","required":true,"schema":{"$ref":"#/definitions/FollowingRequest"}}],"responses":{"200":{"description":"successfully get followees","schema":{"$ref":"#/definitions/FollowingResponse"}},"400":{"description":"bad request"}}}},"/getFollowers":{"get":{"summary":"get followers of the user","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"followingRequest","description":"get followers of the user","required":true,"schema":{"$ref":"#/definitions/FollowingRequest"}}],"responses":{"200":{"description":"successfully get followers","schema":{"$ref":"#/definitions/FollowingResponse"}},"400":{"description":"bad request"}}}},"/getStories":{"get":{"summary":"get user stories","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"getStories","description":"get user stories","required":true,"schema":{"$ref":"#/definitions/StoryRequest"}}],"responses":{"200":{"description":"successfully get stories","schema":{"$ref":"#/definitions/StoryResponse"}},"400":{"description":"bad request"}}}},"/getUserByAlias":{"get":{"summary":"get user object by alias","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"getUserByAlias","description":"get user object by alias","required":true,"schema":{"$ref":"#/definitions/UserRequest"}}],"responses":{"200":{"description":"successfully get user","schema":{"$ref":"#/definitions/UserResponse"}},"400":{"description":"user not found"}}}},"/getFeeds":{"get":{"summary":"get followees feeds","consumes":["application/json","application/xml"],"produces":["application/json","application/xml"],"parameters":[{"in":"body","name":"getFeeds","description":"get followees feeds","required":true,"schema":{"$ref":"#/definitions/FeedRequest"}}],"responses":{"200":{"description":"successfully get feeds","schema":{"$ref":"#/definitions/FeedResponse"}},"400":{"description":"bad request"}}}}},"definitions":{"User":{"type":"object","properties":{"alias":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"password":{"type":"string"},"imageUrl":{"type":"string"}},"xml":{"name":"User"}},"Story":{"type":"object","properties":{"imageUri":{"type":"string"},"timeStamp":{"type":"integer"},"user":{"type":"object","$ref":"#/definitions/User"}},"xml":{"name":"Story"}},"SignUpRequest":{"type":"object","properties":{"alias":{"type":"string"},"password":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"imageURL":{"type":"string"}},"xml":{"name":"SignUpRequest"}},"LoginRequest":{"type":"object","properties":{"alias":{"type":"string"},"password":{"type":"string"}},"xml":{"name":"LoginRequest"}},"LogoutRequest":{"type":"object","properties":{"user":{"type":"object","$ref":"#/definitions/User"}}},"Response":{"type":"object","properties":{"success":{"type":"boolean"}}},"LoginResponse":{"type":"object","properties":{"auth":{"type":"string"},"user":{"type":"object","$ref":"#/definitions/User"},"success":{"type":"object","$ref":"#/definitions/Response"}},"xml":{"name":"LoginResponse"}},"TweetRequest":{"type":"object","properties":{"auth":{"type":"string"},"story":{"type":"object","$ref":"#/definitions/Story"}},"xml":{"name":"TweetRequest"}},"TweetResponse":{"type":"object","properties":{"tweets":{"type":"array","items":{"$ref":"#/definitions/Story"}},"success":{"type":"object","$ref":"#/definitions/Response"}},"xml":{"name":"TweetResponse"}},"FollowingRequest":{"type":"object","properties":{"follower":{"type":"object","$ref":"#/definitions/User"},"lastFollowee":{"type":"object","$ref":"#/definitions/User"},"limit":{"type":"integer"}},"xml":{"name":"FollowingRequest"}},"FollowingResponse":{"type":"object","properties":{"followees":{"type":"array","items":{"$ref":"#/definitions/User"}},"success":{"type":"object","$ref":"#/definitions/Response"}},"xml":{"name":"FollowingResponse"}},"StoryRequest":{"type":"object","properties":{"user":{"type":"object","$ref":"#/definitions/User"},"lastStory":{"type":"object","$ref":"#/definitions/Story"},"limit":{"type":"integer"}},"xml":{"name":"StoryRequest"}},"StoryResponse":{"type":"object","properties":{"stories":{"type":"array","items":{"$ref":"#/definitions/Story"}},"success":{"type":"object","$ref":"#/definitions/Response"}},"xml":{"name":"StoryResponse"}},"UserRequest":{"type":"object","properties":{"alias":{"type":"string"}},"xml":{"name":"UserRequest"}},"UserResponse":{"type":"object","properties":{"alias":{"type":"string"},"success":{"type":"object","$ref":"#/definitions/Response"}},"xml":{"name":"UserResponse"}},"FeedRequest":{"properties":{"follower":{"type":"object","$ref":"#/definitions/User"},"lastFeed":{"type":"object","$ref":"#/definitions/Story"},"limit":{"type":"integer"}},"xml":{"name":"FeedRequest"}},"FeedResponse":{"type":"object","properties":{"feeds":{"type":"array","items":{"$ref":"#/definitions/Story"}},"success":{"type":"object","$ref":"#/definitions/Response"}},"xml":{"name":"FeedResponse"}},"RelationshipRequest":{"properties":{"source":{"type":"object","$ref":"#/definitions/User"},"destination":{"type":"object","$ref":"#/definitions/User"},"isFollowed":{"type":"boolean"}},"xml":{"name":"RelationshipRequest"}},"RelationshipResponse":{"type":"object","properties":{"success":{"type":"object","$ref":"#/definitions/Response"}},"xml":{"name":"RelationshipResponse"}}},"host":"virtserver.swaggerhub.com","schemes":["https"],"basePath":"/youthrich40/340API/1.0"}