From 92aaa50f5383ca86d666cb3d7c35965b5de39411 Mon Sep 17 00:00:00 2001 From: Lukas Engelter Date: Thu, 5 Sep 2024 07:47:40 +0200 Subject: [PATCH 1/2] docs: fix usage example in README.md no "characters" variable was defined which breaks the execution. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 90aea6c..b56be27 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,9 @@ for c in movie["characters"]: print(c) # fetching a person record -person = tvdb.get_person_extended(characters[0]["peopleId"]) +person = tvdb.get_person_extended(movie["characters"][0]["peopleId"]) print(person) -# using since If-Modifed-Since parameter +# using since If-Modified-Since parameter series = tvdb.get_series_extended(393199, if_modified_since="Wed, 30 Jun 2022 07:28:00 GMT") ``` From e7a1bfb1902d91bf950ad9933bf21ab9ee4cffff Mon Sep 17 00:00:00 2001 From: Lukas Engelter Date: Thu, 5 Sep 2024 07:55:48 +0200 Subject: [PATCH 2/2] docs: format file with markdownlint this fixes e.g.: - mixed indentation (MD010) - no trailing spaces (MD009) - heading levels should only increment by one level at a time (MD001) - blank lines around code blocks (MD031) --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b56be27..5fab718 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,16 @@ # tvdb-v4-python + This is the official tvdb api v4 python package -### Installation +## Installation + ```bash python3 -m pip install tvdb_v4_official ``` -### Getting Started -some projects require a user supplied pin as well as an apikey + +## Getting Started + +> Note: some projects require a user supplied pin as well as an apikey ```python3 import tvdb_v4_official @@ -27,8 +31,8 @@ series = tvdb.get_series(121361) series = tvdb.get_series_extended(121361) for season in sorted(series["seasons"], key=lambda x: (x["type"]["name"], x["number"])): if season["type"]["name"] == "Aired Order" and season["number"] == 1: - season = tvdb.get_season_extended(season["id"]) - break + season = tvdb.get_season_extended(season["id"]) + break else: season = None if season is not None: