Skip to content

rzaf/movie-review-api

Repository files navigation

movie-review-api

media rating rest api using laravel framework

Build

  • clone repository git clone https://github.com/rzaf/movie-review-api.git
  • cd to directory cd movie-review-api
  • create .env file and configure your database cp .env.example .env
  • install dependencies composer install
  • genereate new keys php artisan key:generate
  • run migrations and seed database php artisan migrate --seed
  • run server php artisan serve
  • visit /api/documentation route for swagger docs

API Endpoints

protected routes require authentication with api token. admin routes require authenticated user to be admin .

Users

type url protected admin
GET api/users
POST api/users/
POST api/users/login
GET api/users/{username}
PUT api/users/{username}
DELETE api/users/{username}

Categories

type url protected admin
GET api/categories
POST api/categories/
GET api/categories/{name}
PUT api/categories/{name}
DELETE api/categories/{name}

People

type url protected admin
GET api/people
GET api/people/{url}
GET api/people/{url}/medias
POST api/people/
PUT api/people/{url}
DELETE api/people/{url}
GET api/people/{url}/following
DELETE api/people/{url}/following

Medias

type url protected admin
GET api/medias
GET api/medias/{url}
POST api/medias
PUT api/medias/{url}
DELETE api/medias/{url}
POST api/medias/{url}/genres/{name}
DELETE api/medias/{url}/genres/{name}
POST api/medias/{url}/kewords/{name}
DELETE api/medias/{url}/kewords/{name}
POST api/medias/{url}/languages/{name}
DELETE api/medias/{url}/languages/{name}
POST api/medias/{url}/countries/{name}
DELETE api/medias/{url}/countries/{name}
POST api/medias/{url}/companies/{name}
DELETE api/medias/{url}/companies/{name}
POST api/medias/{url}/people/{person_url}
DELETE api/medias/{url}/people/{person_url}

Reviews

type url protected admin
GET api/reviews/{review_id}
DELETE api/reviews/{review_id}
PUT api/reviews/{review_id}
POST api/medias/{url}/reviews
GET api/medias/{url}/reviews

Replies

type url protected admin
GET api/replies/{reply_id}
DELETE api/replies/{reply_id}
PUT api/replies/{reply_id}
POST api/replies
GET api/reviews/{review_id}/replies
GET api/replies/{reply_id}/replies

Likes/Dislikes

type url protected admin
POST api/medias/{url}/like
DELETE api/medias/{url}/like
POST api/reviews/{review_id}/like
DELETE api/reviews/{review_id}/like
POST api/replies/{reply_id}/like
DELETE api/replies/{reply_id}/like