Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Social Interaction Features
Overview
This pull request introduces essential social interaction features to the Twitter Challenge application, including follow/unfollow functionality, timeline generation.
Key Changes
New Follow Management Features
Timeline Infrastructure
New Endpoints
Follow a User
Description: Create a new follow relationship between users
Endpoint:
POST /api/follows/{followerId}Request:
Request Schema:
{ "followedId": "string" }Response Schema:
{ "id": "string", "followerId": "string", "followedId": "string", "createdAt": "date-time" }Status Codes:
Unfollow a User
Description: Remove an existing follow relationship between users
Endpoint:
DELETE /api/follows/{followerId}/{followedId}Request:
Response: No content
Status Codes:
Get User Timeline
Description: Retrieve a user's timeline containing tweets from the user and users they follow
Endpoint:
GET /api/timeline/{userId}Request:
Response Schema:
{ "id": "string", "userId": "string", "tweetIds": [ "string" ], "lastUpdated": "date-time", "tweets": [ { "id": "string", "userId": "string", "content": "string", "createdAt": "date-time", "likeCount": 0 } ] }Status Codes:
Get User Followers
Description: Retrieve a list of users who follow a specific user
Endpoint:
GET /api/follows/followers/{userId}Request:
Response Schema:
[ { "id": "string", "followerId": "string", "followedId": "string", "createdAt": "date-time" } ]Status Codes:
Get User Following
Description: Retrieve a list of users that a specific user is following
Endpoint:
GET /api/follows/following/{userId}Request:
Response Schema:
[ { "id": "string", "followerId": "string", "followedId": "string", "createdAt": "date-time" } ]Status Codes:
Related Issues