create virtual enviroment and activate it \
python3 -m venv env
source env/bin/activate
for Windows
python -m venv env
cd env/Scripts/
Activate
go in to src dir
cd src
install requirements \
pip install -r requirements.txt
create migrations
python manage.py makemigrations
run migrations \
python manage.py migrate
create superuser \
python manage.py createsuperuser
run server \
python manage.py runserver
run tests \
python manage.py test
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
query params:
- name: string name of the group
Example :
{
"id": 1,
"name": "group1",
"channels": [
24,
23
]
}
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
Example : \
[
{
"id": 1,
"name": "group1",
"channels": [
24,
23
]
},
{
"id": 2,
"name": "group2",
"channels": [
25,
26
]
}
]
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Example :
{
"id": 23,
"title": "Movies",
"picture_url": "https://w7.pngwing.com/pngs/327/703/png-transparent-cinema-film-moveis-logo-film-art-film-thumbnail.png",
"is_parent": true,
"parent_channel": null,
"date_created": "2023-02-11T18:43:57.156882Z",
"groups": [
1,
2
]
}
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
query params:
- group: int id of the group
Example :
[
{
"id": 23,
"title": "Movies",
"picture_url": "https://w7.pngwing.com/pngs/327/703/png-transparent-cinema-film-moveis-logo-film-art-film-thumbnail.png",
"is_parent": true,
"parent_channel": null,
"date_created": "2023-02-11T18:43:57.156882Z",
"groups": [
1,
2
]
},
{
"id": 24,
"title": "Series",
"picture_url": "https://e1.pngegg.com/pngimages/312/318/png-clipart-video-formats-icon-tv-series-thumbnail.png",
"is_parent": true,
"parent_channel": null,
"date_created": "2023-02-11T18:45:00.730561Z",
"groups": [
1
]
},
]
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Example :
{
"channel": "Series",
"rating": 8.5
}
Allow: GET, HEAD, OPTIONS
Returns a CSV file with all the ratings of the channels
Example content of the CSV file:
Channel Title,Average Rating
Movies,9
Vikings,9
Action,9
Series,8.5
Better Call Saul,8 \
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Example :
{
"id": 1,
"name": "Movie",
}
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
query params:
- name: string name of the content type
Example :
[
{
"id": 1,
"name": "Movie",
},
{
"id": 2,
"name": "Series",
}
]
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Example : \
{
"id": 1,
"name": "English",
"alias": "en"
}
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
query params:
- name: string name of the lenguage
Example :
[
{
"id": 1,
"name": "English",
"alias": "en"
},
{
"id": 2,
"name": "Spanish",
"alias": "es"
}
]
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Example :
{
"id": 1,
"extra_data": "'grandma_of_the_author': 'Paquita', ... ",
"authors": "Michael Hirst",
"description": "Vikings transports us to the brutal and mysterious world of Ragnar Lothbrok, a Viking warrior and farmer who yearns to explore--and raid--the distant shores across the ocean. The series broadly follows the exploits of the legendary Viking chieftain Ragnar Lothbrok and his crew, and later those of his sons.",
"genere": "Action, Historic",
"lenguage_id": 2,
"content_id": 1
}
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
query params:
- id: int id of the metadata
Example :
[
{
"id": 1,
"extra_data": "'grandma_of_the_author': 'Paquita', ...",
"authors": "Michael Hirst",
"description": "Vikings transports us to the brutal and mysterious world of Ragnar Lothbrok, a Viking warrior and farmer who yearns to explore--and raid--the distant shores across the ocean. The series broadly follows the exploits of the legendary Viking chieftain Ragnar Lothbrok and his crew, and later those of his sons.",
"genere": "Action, Historic",
"lenguage_id": 2,
"content_id": 1
},
{
"id": 2,
"extra_data": "",
"authors": "Vince Gilligan",
"description": "The trials and tribulations of criminal lawyer, Jimmy McGill, in the time leading up to establishing his strip-mall law office in Albuquerque, New Mexico.",
"genere": "Drama, Crime",
"lenguage_id": 1,
"content_id": 2
}
]
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Example :
{
"id": 1,
"title": "Rites of Passage S1 E1",
"file_url": "https://www.youtube.com/watch?v=_LHYMTyp74s&ab_channel=SeriesJL",
"date_created": "2023-02-11T19:10:52.714681Z",
"rating": 9,
"content_type": 2,
"parent_channel": 25
}
Allow: GET, POST, HEAD, OPTIONS
Content-Type: application/json
query params:
- id: int id of the content
- parent_channel: int id of the parent channel of the content
Example :
[
{
"id": 1,
"title": "Rites of Passage S1 E1",
"file_url": "https://www.youtube.com/watch?v=_LHYMTyp74s&ab_channel=SeriesJL",
"date_created": "2023-02-11T19:10:52.714681Z",
"rating": 9,
"content_type": 2,
"parent_channel": 25
},
{
"id": 2,
"title": "Better Call Saul S1 E1",
"file_url": "https://www.youtube.com/watch?v=5Zv5DYMfkoc&ab_channel=SeriesJL",
"date_created": "2023-02-11T19:10:52.714681Z",
"rating": 8,
"content_type": 2,
"parent_channel": 25
}
]