Coder Social home page Coder Social logo

tweet-assignment's Introduction

API overview

This is a restful API with the following endpoints

Method Url Description
POST /users/register Register/Sign-up a new user
POST /users/login Login for an existing user
GET /users/{user_id}/follow Follow a user
GET /users/{user_id}/unfollow Unfollow a user
GET /users/me Get current user info
POST /tweets/new Create a new tweet
GET /tweets/{tweet_id}/ Get a tweet with ID
GET /tweets/{tweet_id}/like Like a tweet
GET /tweets/{tweet_id}/unlike Unlike a tweet
GET /tweets/{tweet_id}/retweet Retweet a tweet
POST /tweets/{tweet_id}/reply Reply to a tweet
GET /tweets/{tweet_id}/replies Get all replies to a tweet
GET /tweets/{tweet_id}/retweets Get all retweets of a tweet

Response Structure

{
    success: true/false,
    message: "...",
    data: [{...}, {...}],
    timestamp: <current_timestamp>
}

The above API response structure is followed for each endpoint listed above. On some endpoints, the data will be an empty array and sometimes the message will be an empty string. The success field will reflect whether the requested operation was performed.

Required fields

  • username and password

    These two fields are required while registering a new user and while logging in.

  • content

    This field is required when creating a new tweet and while replying to a tweet.

tweet-assignment's People

Contributors

cartmanishere avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.