Skip to content

nuhyurdev/easyRESTFUL-api

Repository files navigation

easyRESTFUL-api

Movie API created with express.js



GitHub issues GitHub stars GitHub license

About The Project

This is a RESTful API using express.js and MongoDB no-SQL database system.

(back to top)

Built With

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

  • nodejs Before installation, it's required to done that check the mongodb configuration in the dbhelper

Installation

to install required packages

$ npm install

to run tests

$ npm test

to run with nodemon

$ npm start

(back to top)

Usage

You can use a browser to send HTTP requests or use third-party software which can send HTTP requests. etc. Postman or thunder client being vscode extention

for Movies Collection

Route HTTP Verb POST body Description
/api/movies/getall GET Empty List all movies.
/api/movies POST {'title':'foo', 'category':'bar', 'country':'Turkey', year:1997, director:"id", imdb_score: 10.0 } Create a new movie.
/api/movies/:movie_id GET Empty Get a movie.
/api/movies/:movie_id PUT {'name':'foo', 'surname':'bar'} Update a movie with new info.
/api/movies/:movie_id DELETE Empty Delete a movie.
/api/movies/top10 GET Empty Get the top 10 movies.
/api/movies/between/:start_year/:end_year GET Empty Movies between two dates.

for Directors Collection

Route HTTP Verb POST body Description
/api/directors/getall GET Empty List all directors.
/api/directors GET Empty List all directors relational with Movies.
/api/directors POST { name: 'foo', surname:'bar', bio:'lorem ipsum' } Create a new director.
/api/directors/:director_id GET Empty Get a director.
/api/directors/:director_id PUT {'name':'foo', 'surname':'bar', 'bio': 'lorem'} Update a director with new info.
/api/directors/:director_id DELETE Empty Delete a director.

for Index

Route HTTP Verb POST body Description
/register POST { username: 'foo', password:'1234' } Create a new user.
/authenticate POST { username: 'foo', password:'1234' } Generate a token.

License

Distributed under the Apache-2.0 License. See LICENSE for more information.

(back to top)

Contact

@noaahhh - @noah_the_turk

Project Link: https://github.com/noaahhh/easyRESTFUL-api

(back to top)

Acknowledgments


(back to top)

About

it was made with help of @meseven Udemy course. Thanks @meseven.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published