Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
c308ce1
TVShow: Add collection_progress() method
glensc Jan 11, 2022
649a866
TVShow: Add watched_progress() method
glensc Jan 11, 2022
f234cd8
TVShow: Add collection_progress() testing
glensc Jan 11, 2022
1958dcb
TVShow: Extract progress property body to _progress() method
glensc Jan 11, 2022
b74a0b6
TVShow: Add specials parameter to _progress() method
glensc Jan 11, 2022
02d29f0
Add deprecated~=1.2.13 dependency
glensc Jan 11, 2022
3c3e297
Add User.get_liked_lists method
glensc Jan 11, 2022
f60922b
Add test_liked_lists test
glensc Jan 11, 2022
ee435c5
TVShow: Add count_specials, hidden parameters to _progress
glensc Jan 12, 2022
af1b70d
TVShow: Add count_specials, hidden to watched_progress() and collecti…
glensc Jan 12, 2022
921bfd3
tests: Print urls for what mock data is missing
glensc Jan 12, 2022
f59e560
Fix progress typo
glensc Jan 12, 2022
cc0be4a
Tests: Add mock data for progress/collection
glensc Jan 12, 2022
908ee2d
Add GitHub Actions workflow to publish to pypi
glensc Jan 13, 2022
a133af1
Drop api_key (deprecated in 2.x)
glensc Jan 14, 2022
2fa05dd
Add BadResponseException exception with code -1
glensc Jan 15, 2022
5a3fdf1
Add deprecated~=1.2.13 dependency
glensc Jan 11, 2022
ae7d500
Update documentation for get_watchlist
glensc Jan 15, 2022
69936fb
Deprecate get_watched to indicate wrong api call being used
glensc Jan 15, 2022
6d36b68
Catch json decode errors for unhandled status codes
glensc Jan 15, 2022
9d46799
Test details of TVSeason containing TVEpisode
glensc Jan 15, 2022
bb77719
TVShow: Use /seasons endpoint to fill seasons and episodes
glensc Jan 12, 2022
123d7c3
Avoid poisoning "number" into TVSeason
glensc Jan 15, 2022
d11e29b
Add shows/the-flash-2014/seasons?extended=episodes mock data
glensc Jan 15, 2022
fc7a72b
Drop classes extending from object
glensc Jan 15, 2022
bc77e26
Cleanup: __iter__ doesn't take any args
glensc Jan 15, 2022
6d26869
Remove old (python<3.0) super constructor syntax
glensc Jan 16, 2022
e83d72d
Move extract_ids(media_item) to be able to make atomic commits
glensc Jan 15, 2022
b86e0d6
Add mixins module
glensc Jan 15, 2022
4cab98e
Add IdsMixin
glensc Jan 15, 2022
dfc4bcd
Build ids dynamically
glensc Jan 16, 2022
a77bd78
Person: Use IdsMixin
glensc Jan 15, 2022
c7a6133
Movie: Use IdsMixin
glensc Jan 15, 2022
642a66d
TVEpisode: Use IdsMixin
glensc Jan 15, 2022
d993aa9
TVSeason: Use IdsMixin
glensc Jan 15, 2022
27be41a
TVShow: Use IdsMixin
glensc Jan 15, 2022
01e495e
UserList: Use IdsMixin
glensc Jan 15, 2022
762217d
Drop un-needed extract_ids
glensc Jan 16, 2022
f8f7a2e
Correct doc: dismiss_recommendation accepts only title
glensc Jan 16, 2022
19b599d
Refactor slugify to handle special cases
glensc Jan 17, 2022
9a391e3
Add two slugify special cases to test
glensc Jan 17, 2022
1890686
Add Bad Gateway exception
glensc Jan 23, 2022
80de702
Don't log headers to protect privacy
glensc Jan 30, 2022
350a530
Return responses of Scrobble methods
glensc Jan 30, 2022
629b425
Return season slug from seasons function
Feb 19, 2022
31d6737
Add details parameter to BadResponseException constructor
glensc Jan 15, 2022
27d90b1
Add details to BadResponseException of json error
glensc Jan 15, 2022
d6fe4dd
fix wrong uri in sync.py
simonc56 Jun 13, 2022
80fae41
fix season number in show_collection
simonc56 Jun 13, 2022
2613efb
type added to Userlist
simonc56 Jun 18, 2022
27f9375
add type value to lists
simonc56 Jun 18, 2022
827550a
Merge branch 'BadResponseException'
glensc Oct 16, 2022
fb98340
add show_id attribute to TVEpisode found from search
simonc56 Oct 22, 2022
da02d95
uses show_id instead of slug when available
simonc56 Oct 23, 2022
72a80d5
Add name to authors
glensc Oct 23, 2022
5440af3
Set version to 3.4.1
glensc Oct 23, 2022
b8f30da
Merge branch 'list-type'
glensc Oct 23, 2022
becb165
Set version to 3.4.2
glensc Oct 23, 2022
dee22cb
Merge branch 'user/get_liked_lists'
glensc Oct 23, 2022
b3a46e9
Set version to 3.4.3
glensc Oct 23, 2022
5a7377f
Merge branch 'show/episodes'
glensc Oct 23, 2022
4a2d6f4
Set version to 3.4.4
glensc Oct 23, 2022
4d09a72
Merge branch 'pypi-publish'
glensc Oct 23, 2022
62f73db
Update project homepage, name package as "pytrakt"
glensc Oct 23, 2022
4bd4bb7
Update some project urls
glensc Oct 23, 2022
19123ac
Fix DEFAULT_PYTHON parsing in yaml
glensc Oct 23, 2022
48a0579
Set version to 3.4.5
glensc Oct 23, 2022
b8ebac6
Update actions to avoid node 12 deprecation warnings
glensc Oct 23, 2022
380d5a7
Add version file
glensc Oct 23, 2022
56fcd88
Use __version__ from __version__.py
glensc Oct 23, 2022
e8937ee
Automate version setup for PyPI publishing in CI
glensc Oct 23, 2022
ef4b4ef
Automate version setup for PyPI publishing in CI (#1)
glensc Oct 23, 2022
237ed8a
pip install pytrakt
simonc56 Oct 23, 2022
dece4d0
Merge branch 'get-show_id-from-episode-search'
glensc Oct 23, 2022
e1c4be0
Merge branch 'shows/progress'
glensc Oct 23, 2022
c772ca9
Merge branch 'deprecated-dep'
glensc Oct 23, 2022
125c9ae
Add workflow to run tests in CI
glensc Oct 24, 2022
0cd061b
Run tests in matrix
glensc Oct 24, 2022
afd45fc
Update badges for project name
glensc Oct 24, 2022
7c7e4d4
Update CI badge url
glensc Oct 24, 2022
4bc933d
Remove circleci setup
glensc Oct 24, 2022
28322e2
Few more master -> main changes
glensc Oct 24, 2022
0fe6287
Add workflow to run tests in CI (#2)
glensc Oct 24, 2022
7fe463d
Use @classmethod propertly
glensc Oct 24, 2022
4618309
Use @staticmethod instead of @classmethod
glensc Oct 24, 2022
69b4138
Fix: Use @classmethod propertly (#3)
glensc Oct 24, 2022
75abb0e
Merge branch 'remove-deprecated-super'
glensc Oct 24, 2022
edb257e
Merge branch 'Bad-Gateway'
glensc Oct 24, 2022
a24cc57
Merge branch 'scrobble-response'
glensc Oct 24, 2022
9abe916
Merge branch 'patch-2'
glensc Oct 24, 2022
f6875ea
Merge branch 'cleanup-args'
glensc Oct 24, 2022
db50999
Add progress parameter to Scrobbler methods
glensc Oct 24, 2022
ff50421
add show_id to TVEpisode
simonc56 Oct 25, 2022
7118e50
Merge branch 'fix-wrong-uri'
glensc Oct 25, 2022
9660b93
Run CI tests on default branch
glensc Oct 25, 2022
76760b5
add show_id to TVEpisode (#6)
glensc Oct 25, 2022
f27ea2f
Feature: Add progress parameter to Scrobbler methods (#5)
glensc Oct 30, 2022
45ec546
Update methods to return api responses
glensc Nov 2, 2022
f230a8f
Update tests to match signature
glensc Nov 2, 2022
8cbc856
Merge branch '165-slugpattern'
glensc Nov 2, 2022
51fe122
Merge branch 'drop-api_key'
glensc Nov 2, 2022
0a4902f
Merge branch '160-deprecate_get_watched'
glensc Nov 2, 2022
e74486f
Merge branch 'py3-implicit-object'
glensc Nov 2, 2022
f82cfcc
Merge branch 'tests/mock_data-missing'
glensc Nov 2, 2022
c5f3047
Feature: Update methods to return api responses (#7)
glensc Nov 2, 2022
18f0ac3
Merge branch 'fix-tvseason-number'
glensc Nov 6, 2022
3a6ab70
Merge branch 'fix/156-wrong-tv-season-returned'
glensc Nov 6, 2022
fe8d333
Initialize Movie.trakt property with None
glensc Nov 29, 2022
2dd7a50
Merge branch 'remove_extract_ids' into merge-remove_extract_ids
glensc Nov 29, 2022
34f60ff
Fix Game of Thrones trakt id
glensc Nov 30, 2022
6c517e4
Use trakt_id for slug in TVShow ext property if available
glensc Nov 29, 2022
bc5499b
Update test data to use trakt id for shows
glensc Nov 30, 2022
6589e47
Fix: Prefer trakt id for TVShow api requests over title (#9)
glensc Nov 30, 2022
ac47b56
Initialize Movie.trakt property with None (#8)
glensc Nov 30, 2022
cff6cf1
docs: Correct doc: dismiss_recommendation accepts only title
glensc Jan 16, 2022
ffa5702
docs: Use https urls
glensc Nov 30, 2022
9b403a3
docs: Update pip url to be current
glensc Nov 30, 2022
08efee5
docs: Update trakt api docs url
glensc Nov 30, 2022
fb22289
docs: Fix package name in install doc
glensc Nov 30, 2022
ca0c2ac
docs: Fix branch name in install doc
glensc Nov 30, 2022
912c0d3
docs: Remove duplicate sync from doc index
glensc Nov 30, 2022
123a7cc
docs: Remove rate_movies example from docs
glensc Nov 30, 2022
5060fd0
docs: Fix method calls in docs, they are not properties
glensc Nov 30, 2022
a6219ba
docs: Remove python 2 leftovers of b"" strings
glensc Nov 30, 2022
ef23d29
docs: Son of Batman example can't be found without specifying year
glensc Nov 30, 2022
0e4ccc9
docs: Fix released_iso to release field rename
glensc Nov 30, 2022
1021484
docs: Update to string responses in python 3
glensc Nov 30, 2022
07a6f06
docs: Fix compatibility typo
glensc Nov 30, 2022
5c2d8c9
docs: Fix title quoting
glensc Nov 30, 2022
6f98c1c
docs: Remove gender and location properties from User example
glensc Nov 30, 2022
db97e2c
Documentation fixes (#11)
glensc Nov 30, 2022
1165cd0
Cleanup useless super init calls
glensc Dec 11, 2022
718878c
Merge remote-tracking branch 'origin/main' into merge-remove_extract_ids
glensc Dec 11, 2022
137e639
Fix use of trakt property
glensc Dec 11, 2022
e6df575
Refactor: Add IdsMixin to replace extract_ids() utility method (#14)
glensc Dec 11, 2022
6be1186
Cleanup useless super init calls (#13)
glensc Dec 11, 2022
b5dfbeb
Revert "Cleanup useless super init calls"
glensc Dec 11, 2022
bb63b4d
Add test for People.ids
glensc Dec 11, 2022
ae1a55e
Add ids setter
glensc Dec 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 0 additions & 161 deletions .circleci/config.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see:
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: PyPI

on:
workflow_dispatch: ~
release:
types: [published]
push:
tags:
- '*.*.*'

env:
DEFAULT_PYTHON: "3.10"

jobs:
pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Set version variable
id: version
run: |
if [[ "${GITHUB_REF#refs/heads/}" = "${GITHUB_REF}" ]]; then
APP_VERSION=${GITHUB_REF#refs/tags/}
else
git fetch --tags --unshallow
version=$(git describe --tags --abbrev=0)
subver=${{ github.run_number }}
APP_VERSION=$version.post$subver
fi
echo "version=$APP_VERSION" >> $GITHUB_OUTPUT

- name: Install dependencies and build
env:
APP_VERSION: ${{ steps.version.outputs.version }}
run: |
# Setup version
set -x
echo "__version__ = '$APP_VERSION'" > trakt/__version__.py
cat trakt/__version__.py
python -c "from trakt import __version__; print(__version__)"

# Build the package
python -m pip install --upgrade build
python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

# vim:ts=2:sw=2:et
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test

on:
pull_request:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-20.04
name: Python ${{ matrix.python }}
strategy:
matrix:
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"

steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: pip
- name: Install dependencies (pip)
run: python -m pip install -r requirements.txt -r testing-requirements.txt
- name: Test
run: make test

# vim:ts=2:sw=2:et
31 changes: 16 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
PyTrakt
=======
.. image:: https://circleci.com/gh/moogar0880/PyTrakt/tree/master.svg?style=svg
:target: https://circleci.com/gh/moogar0880/PyTrakt/tree/master
:alt: CircleCI Status

.. image:: https://img.shields.io/pypi/dm/trakt.svg
:target: https://pypi.python.org/pypi/trakt
.. image:: https://github.com/glensc/python-pytrakt/actions/workflows/test.yml/badge.svg
:target: https://github.com/glensc/python-pytrakt/actions
:alt: CI Status

.. image:: https://img.shields.io/pypi/dm/pytrakt.svg
:target: https://pypi.org/project/pytrakt/
:alt: Downloads

.. image:: https://img.shields.io/pypi/l/trakt.svg
:target: https://pypi.python.org/pypi/trakt/
.. image:: https://img.shields.io/pypi/l/pytrakt.svg
:target: https://pypi.org/project/pytrakt/
:alt: License

This module is designed to be a Pythonic interface to the `Trakt.tv <http://trakt.tv>`_.
Expand All @@ -30,23 +31,23 @@ Install Via Pip
^^^^^^^^^^^^^^^
To install with `pip <http://www.pip-installer.org/>`_, just run this in your terminal::

$ pip install trakt
$ pip install pytrakt

Get the code
^^^^^^^^^^^^
trakt is available on `GitHub <https://github.com/moogar0880/PyTrakt>`_.
trakt is available on `GitHub <https://github.com/glensc/python-pytrakt>`_.

You can either clone the public repository::

$ git clone git://github.com/moogar0880/PyTrakt.git
$ git clone git://github.com/glensc/python-pytrakt.git

Download the `tarball <https://github.com/moogar0880/PyTrakt/tarball/master>`_::
Download the `tarball <https://github.com/glensc/python-pytrakt/tarball/main>`_::

$ curl -OL https://github.com/moogar0880/PyTrakt/tarball/master
$ curl -OL https://github.com/glensc/python-pytrakt/tarball/main

Or, download the `zipball <https://github.com/moogar0880/PyTrakt/zipball/master>`_::
Or, download the `zipball <https://github.com/glensc/python-pytrakt/zipball/main>`_::

$ curl -OL https://github.com/moogar0880/PyTrakt/zipball/master
$ curl -OL https://github.com/glensc/python-pytrakt/zipball/main

Once you have a copy of the source, you can embed it in your Python package,
or install it into your site-packages easily::
Expand All @@ -58,7 +59,7 @@ Contributing
Pull requests are graciously accepted. Any pull request should not break any tests
and should pass `flake8` style checks (unless otherwise warranted). Additionally
the user opening the Pull Request should ensure that their username and a link to
their GitHub page appears in `CONTRIBUTORS.md <https://github.com/moogar0880/PyTrakt/blob/master/CONTRIBUTORS.md>`_.
their GitHub page appears in `CONTRIBUTORS.md <https://github.com/glensc/python-pytrakt/blob/main/CONTRIBUTORS.md>`_.


TODO
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILDDIR = _build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://sphinx-doc.org/)
endif

# Internal variables.
Expand Down
2 changes: 0 additions & 2 deletions docs/getstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ Should you choose to store your credentials in another way and not to set the
`store` flag, you will need to ensure that your application applies the
following settings before attempting to interact with Trakt

* `trakt.core.api_key`
* Note: api_key is deprecated in favor of OAUTH_TOKEN and will go away with the next major release
* `trakt.core.OAUTH_TOKEN`
* `trakt.core.CLIENT_ID`
* `trakt.core.CLIENT_SECRET`
Expand Down
21 changes: 10 additions & 11 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ trakt: Python interface to Trakt.tv
===================================
Release v\ |version|.

This module is designed to be a Pythonic interface to the `Trakt.tv <http://trakt.tv>`_.
REST API. The official documentation for which can be found `here <http://trakt.tv/api-docs/>`_.
This module is designed to be a Pythonic interface to the `Trakt.tv <https://trakt.tv>`_.
REST API. The official documentation for which can be found `here <https://trakt.docs.apiary.io>`_.
trakt contains interfaces to all of the Trakt.tv functionality in an, ideally, easily
scriptable fashion.

Expand All @@ -22,25 +22,25 @@ There are two ways through which you can install trakt

Install Via Pip
^^^^^^^^^^^^^^^
To install with `pip <http://www.pip-installer.org/>`_, just run this in your terminal::
To install with `pip <https://pip.pypa.io/>`_, just run this in your terminal::

$ pip install trakt
$ pip install pytrakt

Get the code
^^^^^^^^^^^^
trakt is available on `GitHub <https://github.com/moogar0880/PyTrakt>`_.
trakt is available on `GitHub <https://github.com/glensc/python-pytrakt>`_.

You can either clone the public repository::

$ git clone git://github.com/moogar0880/PyTrakt.git
$ git clone git://github.com/glensc/python-pytrakt.git

Download the `tarball <https://github.com/moogar0880/PyTrakt/tarball/master>`_::
Download the `tarball <https://github.com/glensc/python-pytrakt/tarball/main>`_::

$ curl -OL https://github.com/moogar0880/PyTrakt/tarball/master
$ curl -OL https://github.com/glensc/python-pytrakt/tarball/main

Or, download the `zipball <https://github.com/moogar0880/PyTrakt/zipball/master>`_::
Or, download the `zipball <https://github.com/glensc/python-pytrakt/zipball/main>`_::

$ curl -OL https://github.com/moogar0880/PyTrakt/zipball/master
$ curl -OL https://github.com/glensc/python-pytrakt/zipball/main

Once you have a copy of the source, you can embed it in your Python package,
or install it into your site-packages easily::
Expand All @@ -62,7 +62,6 @@ including example usages.
people.rst
tv.rst
users.rst
sync.rst
core.rst
sync.rst

Expand Down
Loading