[Python-modules-commits] [python-tmdbsimple] 01/06: Import python-tmdbsimple_1.7.0.orig.tar.gz

Michael Fladischer fladi at moszumanska.debian.org
Mon Jul 17 08:26:50 UTC 2017


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch master
in repository python-tmdbsimple.

commit 86530dcbcfd7f38f97af4c14ce2849dce3a796d2
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Mon Jul 17 10:01:54 2017 +0200

    Import python-tmdbsimple_1.7.0.orig.tar.gz
---
 setup.py               |  4 ++--
 tests/test_movies.py   |  2 +-
 tests/test_tv.py       | 11 +++++++++++
 tmdbsimple/__init__.py |  2 +-
 tmdbsimple/movies.py   |  2 +-
 tmdbsimple/tv.py       | 38 +++++++++++++++++++++++++++++++++++++-
 6 files changed, 53 insertions(+), 6 deletions(-)

diff --git a/setup.py b/setup.py
index 10c8b04..83ce203 100644
--- a/setup.py
+++ b/setup.py
@@ -11,14 +11,14 @@ def read(fname):
 # requests[security]: http://stackoverflow.com/questions/29134512/insecureplatformwarning-a-true-sslcontext-object-is-not-available-this-prevent/29202163#29202163
 setup(
     name = 'tmdbsimple',
-    version = '1.6.1',
+    version = '1.7.0',
     author = 'Celia Oakley',
     author_email = 'celia.oakley at alumni.stanford.edu',
     description = 'A Python wrapper for The Movie Database API v3',
     keywords = ['movie', 'the movie database', 'movie database', 'tmdb', 
                 'wrapper', 'database', 'themoviedb', 'moviedb', 'api'],
     url = 'https://github.com/celiao/tmdbsimple',
-    download_url = 'https://github.com/celiao/tmdbsimple/tarball/1.6.1',
+    download_url = 'https://github.com/celiao/tmdbsimple/tarball/1.7.0',
     packages = ['tmdbsimple'],
     long_description=read('README.rst'),
     install_requires = ['requests[security]'],
diff --git a/tests/test_movies.py b/tests/test_movies.py
index 4e8eee2..7291d1d 100644
--- a/tests/test_movies.py
+++ b/tests/test_movies.py
@@ -172,7 +172,7 @@ class CollectionsTestCase(unittest.TestCase):
         id = COLLECTION_ID
         collection = tmdb.Collections(id)
         response = collection.images()
-        self.assertTrue(hasattr(collection, 'parts'))
+        self.assertTrue(hasattr(collection, 'backdrops'))
 
 
 class CompaniesTestCase(unittest.TestCase):
diff --git a/tests/test_tv.py b/tests/test_tv.py
index 0898d91..c05e0b4 100644
--- a/tests/test_tv.py
+++ b/tests/test_tv.py
@@ -50,6 +50,12 @@ class TVTestCase(unittest.TestCase):
         response = tv.info()
         self.assertEqual(tv.name, name)
 
+    def test_tv_alternative_titles(self):
+        id = TV_ID
+        tv = tmdb.TV(id)
+        response = tv.alternative_titles()
+        self.assertTrue(hasattr(tv, 'results'))
+
     def test_tv_credits(self):
         id = TV_ID
         tv = tmdb.TV(id)
@@ -100,6 +106,11 @@ class TVTestCase(unittest.TestCase):
         response = tv.videos()
         self.assertTrue(hasattr(tv, 'results'))
 
+    def test_tv_latest(self):
+        tv = tmdb.TV()
+        response = tv.latest()
+        self.assertTrue(hasattr(tv, 'first_air_date'))
+
     def test_tv_on_the_air(self):
         tv = tmdb.TV()
         response = tv.on_the_air()
diff --git a/tmdbsimple/__init__.py b/tmdbsimple/__init__.py
index 9314fef..4e4b451 100644
--- a/tmdbsimple/__init__.py
+++ b/tmdbsimple/__init__.py
@@ -17,7 +17,7 @@ https://www.themoviedb.org/documentation/api/status-codes
 """
 
 __title__ = 'tmdbsimple'
-__version__ = '1.6.1'
+__version__ = '1.7.0'
 __author__ = 'Celia Oakley'
 __copyright__ = 'Copyright (c) 2013-1017 Celia Oakley'
 __license__ = 'GPLv3'
diff --git a/tmdbsimple/movies.py b/tmdbsimple/movies.py
index 438b7f7..e725c6a 100644
--- a/tmdbsimple/movies.py
+++ b/tmdbsimple/movies.py
@@ -437,7 +437,7 @@ class Collections(TMDB):
         Returns:
             A dict respresentation of the JSON returned from the API.
         """
-        path = self._get_id_path('info')
+        path = self._get_id_path('images')
 
         response = self._GET(path, kwargs)
         self._set_attrs_to_values(response)
diff --git a/tmdbsimple/tv.py b/tmdbsimple/tv.py
index c7c6226..8e75301 100644
--- a/tmdbsimple/tv.py
+++ b/tmdbsimple/tv.py
@@ -14,7 +14,6 @@ Created by Celia Oakley on 2013-10-31.
 
 from .base import TMDB
 
-
 class TV(TMDB):
     """
     TV functionality.
@@ -24,6 +23,7 @@ class TV(TMDB):
     BASE_PATH = 'tv'
     URLS = {
         'info': '/{id}',
+        'alternative_titles': '/{id}/alternative_titles',
         'credits': '/{id}/credits',
         'external_ids': '/{id}/external_ids',
         'images': '/{id}/images',
@@ -32,6 +32,7 @@ class TV(TMDB):
         'recommendations': '/{id}/recommendations',
         'translations': '/{id}/translations',
         'videos': '/{id}/videos',
+        'latest': '/latest',
         'on_the_air': '/on_the_air',
         'airing_today': '/airing_today',
         'top_rated': '/top_rated',
@@ -60,6 +61,24 @@ class TV(TMDB):
         self._set_attrs_to_values(response)
         return response
 
+
+    def alternative_titles(self, **kwargs):
+        """
+        Get the alternative titles for a specific tv id.
+        
+        Args:
+            language: (optional) ISO 3166-1 code.
+            append_to_response: (optional) Comma separated, any tv method.
+        Returns:
+            A dict respresentation of the JSON returned from the API.
+        """
+        path = self._get_id_path('alternative_titles')
+
+        response = self._GET(path, kwargs)
+        self._set_attrs_to_values(response)
+        return response
+
+
     def credits(self, **kwargs):
         """
         Get the cast & crew information about a TV series. Just like the 
@@ -202,6 +221,23 @@ class TV(TMDB):
         self._set_attrs_to_values(response)
         return response
 
+    def latest(self, **kwargs):
+        """
+        Get the most newly created TV show. This is a live response
+		and will continuously change.
+
+        Args:
+            language: (optional) ISO 639 code.
+
+        Returns:
+            A dict respresentation of the JSON returned from the API.
+        """
+        path = self._get_id_path('latest')
+
+        response = self._GET(path, kwargs)
+        self._set_attrs_to_values(response)
+        return response
+
     def on_the_air(self, **kwargs):
         """
         Get the list of TV shows that are currently on the air. This query

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-tmdbsimple.git



More information about the Python-modules-commits mailing list