diff --git a/betaseries.py b/betaseries.py index 3188de7..fc04880 100644 --- a/betaseries.py +++ b/betaseries.py @@ -3,6 +3,11 @@ import requests import json from config import config +#Love Is War / Une serie pour tester le programme. +thetvdb_id= '354198' + + +token = config['token'] client_id = config['client_id'] login = config['login'] password = config['password'] @@ -18,3 +23,10 @@ def login_beta(): data = request.json() betauser = str(data['token']) return betauser + + +def create_api(choice): + if choice == 'latest' : + base_url = 'https://api.betaseries.com/episodes/latest?' + API = base_url + 'token=' + token + '&client_id=' + client_id + '&thetvdb_id=' + thetvdb_id + return API \ No newline at end of file