Heroku Link : https://elmintrix-capstone.herokuapp.com
Local Link : http://localhost:5000
pip install -r requirements.txt
export DATABASE_URL=<database-connection-url>
export FLASK_APP=app.py
export FLASK_ENV=development
flask run
The application can run locally , The hosted Version is at https://elmintrix-capstone.herokuapp.com
-
Casting Assistant
- Can View Actors and movies
get:actors, get:movies
-
Casting Director
- All permissions a Casting Assistant has and
- Add or delete an actor from the database
- Modify actors or movies
patch:actor, patch:movie, post:actor, post:movie
-
Executive Producer
- All permissions a Casting Director has and
- Add or delete a movie from the database
delete:actor, delete:movie
-
General
- gets the list of all the actors
- requires
get:actors
permission
-
Request Example :
https://elmintrix-capstone.herokuapp.com/actors
{
"actors": [
{
"id": 1,
"name": "Mark Whalberg",
"age": 49
},
{
"id": 2,
"name": "Tom Cruze",
"age": 30
}
],
"success": true
}
-
General
- creates a new actor
- requires
post:actor
permission
-
Request Body
- name: string, required
- age: integer, required
-
Sample Request
https://elmintrix-capstone.herokuapp.com/actors
- Request Body
{
"id": 1,
"name": "Eddie",
"age": "24"
}
{
"actor": {
"id": 1,
"name": "Eddie",
"age": 24
},
"success": true
}
-
General
- updates the info for an actor
- requires
patch:actor
permission
-
Request Body (at least one of the following fields required)
- name: string, optional
- age: date, optional
-
Sample Request
https://elmintrix-capstone.herokuapp.com/actors/1
- Request Body
{
"name": "Keanu reeves"
}
{
"actor.id": 1,
"success": true
}
-
General
- deletes the actor
- requires
delete:actor
permission
-
Sample Request
https://elmintrix-capstone.herokuapp.com/actors/1
{
"actor_id": {
"age": 18,
"id": 1,
"name": "MeoMeo"
},
"success": true
}
-
General
- gets the list of all the movies
- requires
get:movies
permission
-
Sample Request
https://elmintrix-capstone.herokuapp.com/movies
{
"movies": [
{
"id": 1,
"release_date": "Mon, 12 Dec 2022 00:00:00 GMT",
"title": "The Matrix 4"
},
{
"id": 2,
"release_date": "Mon, 23 Apr 2012 00:00:00 GMT",
"title": "Interstellar 2"
}
],
"success": true
}
-
General
- creates a new movie
- requires
post:movie
permission
-
Request Body
- title: string, required
- release_date: Date, required
-
Sample Request
https:/elmintrix-capstone.herokuapp.com/actors
- Request Body
{
"title": "The Matrix 4",
"release_date": "2012-04-23"
}
{
"movie": {
"id": 1,
"release_date": "Mon, 23 Apr 2012 00:00:00 GMT",
"title": "The Matrix 4"
},
"success": true
}
-
General
- updates the info for a movie
- requires
patch:movie
permission
-
Request Body (at least one of the following fields required)
- title: string, optional
- release_date: Date, optional
-
Sample Request
https://elmintrix-capstone.herokuapp.com/movies/3
- Request Body
{
"title": "HitMan 3"
}
{
"actor.id": 2,
"success": true
}
-
General
- deletes the movie
- requires
delete:movie
permission - will not affect the actors present in the database
-
Sample Request
https://elmintrix-capstone.herokuapp.com/movies/3
{
"movie": {
"id": 3,
"release_date": "Mon, 23 Apr 2012 00:00:00 GMT",
"title": "The Matrix 4"
},
"success": true
}