A RESTful API for mobile application and web services to access cinema guide listings using Laravel
- Make sure you have the requirements
- Clone the repo
- Create and Configure your .env file. (This app requires a database. Tested using MySQL)
- Install the dependencies
composer install
- Run the database migrations
php artisan migrate
- Seed the database
php artisan db:seed
- Start the server
php artisan serve
- Proceed to http://localhost:8000/ and click on one of the endpoints
Endpoint | Description |
---|---|
/cinemas | List of all cinemas |
/cinemas/{cinema_name} | Individual cinema information |
/movies | List of all movies |
/movies/{movie_name} | Individual movie information |
/sessions | All sessions |
/sessions/{cinema_id} | All sessions for cinema |
/sessions/{cinema_id}/{movie_id} | All sessions for cinema and movie |
/sessions/any/{movie_id} | All sessions for a movie |
- To filter results by date please supply the date in json format.
- Accepted date formats:
YYYY
,YYYY-MM
andYYYY-MM-DD
- Accepted date formats:
Example:
POST /movies/aut%20deserunt%20tenetur
content-type: application/json
cache-control: no-cache
user-agent: PostmanRuntime/7.1.5
accept: */*
host: 127.0.0.1:8000
accept-encoding: gzip, deflate
content-length: 28
{
"date" : "2018-09-01"
}
- To send/test a JSON request I recommend the use of Postman