- Cloning git repository and entry in repository
$ git clone https://github.com/joaaomanooel/twitter-clone-api.git
after
$ cd twitter-clone-api
- Install Dependencies
$ npm i
or
$ yarm install
- Runing API
$ npm start
or with nodemon
$ npm run dev
URL
localhost:3000/api/v1/tweet/
Http Methods
-
Get All
Methods Params GET NULL
Rsponse example:
[
{
"author": "João Manoel Neto",
"content": "Testing response =)",
"createdAt": "2018-11-16T21:59:33.828Z",
"likes": 1,
"__v": 0,
"_id": "5bef3df10010962795f0d54a"
}
]
-
Create a new
Methods Params POST NULL
Expected body request:
[
{
"author": "Example author",
"content": "Example tweet",
}
]
URL
localhost:3000/api/v1/likes/:id
-
Like a tweet
Methods Params PUT Tweet ID (objectId)
Example request:
localhost:3000/api/v1/likes/5bef3df10010962795f0d54a
Rsponse example:
{
"author": "João Manoel Neto",
"content": "Testing response =)",
"createdAt": "2018-11-16T21:59:33.828Z",
"likes": 2,
"__v": 0,
"_id": "5bef3df10010962795f0d54a"
}
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
João Manoel Neto |
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details