https://github.com/alertis/node-egitimi-movie-api
NodeJS Movie API
https://github.com/alertis/node-egitimi-movie-api
Last synced: over 1 year ago
JSON representation
NodeJS Movie API
- Host: GitHub
- URL: https://github.com/alertis/node-egitimi-movie-api
- Owner: Alertis
- License: apache-2.0
- Created: 2018-12-09T01:34:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-19T18:37:49.000Z (over 7 years ago)
- Last Synced: 2025-01-23T22:30:58.100Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-egitimi-movie-api
Mehmet Seven'in Udemy üzerinde yayınlanan "Sıfırdan Her Yönüyle Node.JS" adlı eğitim setinde "Express ve MongoDB ile Restful API Geliştirme Projesi" bölümünde kullanılan Movie API reposudur. Eğitim amacıyla uygulanmıştır.
# Movies
| Route | HTTP Verb | POST body | Description |
| --- | --- | --- | --- |
| /api/movies | `GET` | Empty | List all movies. |
| /api/movies | `POST` | {'title':'foo', 'category':'bar', 'country':'Turkey', year:1990, director:"id", imdb_score: 9.7 } | 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. |
# Directors
| Route | HTTP Verb | POST body | Description |
| --- | --- | --- | --- |
| /api/directors | `GET` | Empty | List all directors. |
| /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. |
| /api/directors/:director_id/best10movie | `GET` | Empty | The director's top 10 films. |
# 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. |