media rating rest api using laravel framework
- 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
protected routes require authentication with api token. admin routes require authenticated user to be admin .
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} |
✓ | ✗ |
type | url | protected | admin |
---|---|---|---|
GET | api/categories |
✗ | ✗ |
POST | api/categories/ |
✓ | ✓ |
GET | api/categories/{name} |
✗ | ✗ |
PUT | api/categories/{name} |
✓ | ✓ |
DELETE | api/categories/{name} |
✓ | ✓ |
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 |
✓ | ✗ |
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} |
✓ | ✓ |
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 |
✗ | ✗ |
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 |
✗ | ✗ |
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 |
✓ | ✗ |