mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-23 20:23:08 +00:00
Started work on better documentation
This commit is contained in:
parent
976ab0236f
commit
c684552792
9 changed files with 36 additions and 50 deletions
18
.gitignore
vendored
18
.gitignore
vendored
|
@ -1,21 +1,19 @@
|
|||
syntax: glob
|
||||
*.db
|
||||
*.egg-info
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
*.sublime-*
|
||||
*.swp
|
||||
*__pycache__*
|
||||
dist
|
||||
build
|
||||
*.egg-info
|
||||
.idea/
|
||||
lib/
|
||||
bin/
|
||||
include/
|
||||
.cache/
|
||||
.idea/
|
||||
.Python
|
||||
bin/
|
||||
build
|
||||
dist
|
||||
docs/_build/
|
||||
|
||||
include/
|
||||
lib/
|
||||
pip-selfcheck.json
|
||||
|
||||
pyvenv.cfg
|
||||
|
|
|
@ -9,7 +9,7 @@ are permitted provided that the following conditions are met:
|
|||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name conky-pkmeter nor the names of its contributors
|
||||
* Neither the name python-plexapi nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
|
||||
Welcome to Python PlexAPI's documentation!
|
||||
==========================================
|
||||
|
||||
Python PlexAPI
|
||||
==============
|
||||
.. include:: toc.rst
|
||||
|
||||
.. automodule:: myplex
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
||||
Usage & Contributions
|
||||
---------------------
|
||||
* Source is available on the `Github Project Page <https://github.com/mjs7231/python-plexapi>`_.
|
||||
* Contributors to python-plexapi own their own contributions and may distribute that code under
|
||||
the `BSD license <https://github.com/mjs7231/python-plexapi/blob/master/LICENSE.txt>`_.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
PlexAPI Introduction
|
||||
====================
|
||||
Introduction
|
||||
============
|
||||
|
||||
.. |br| raw:: html
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ MyPlex (plexapi.myplex)
|
|||
-----------------------
|
||||
.. automodule:: plexapi.myplex
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Photo (plexapi.photo)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:maxdepth: 2
|
||||
:caption: Table of Contents
|
||||
|
||||
self
|
||||
introduction
|
||||
modules
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
Python 2/3 compatability
|
||||
Always try Py3 first
|
||||
"""
|
||||
import sys
|
||||
|
||||
try:
|
||||
from urllib.parse import urlencode
|
||||
|
@ -20,8 +21,13 @@ try:
|
|||
except ImportError:
|
||||
from urllib import unquote
|
||||
|
||||
|
||||
try:
|
||||
from configparser import ConfigParser
|
||||
except ImportError:
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
try:
|
||||
from xml.etree import cElementTree as ElementTree
|
||||
except ImportError:
|
||||
from xml.etree import ElementTree
|
||||
|
|
@ -1,23 +1,11 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
|
||||
if sys.version_info <= (3, 3):
|
||||
try:
|
||||
from xml.etree import cElementTree as ElementTree
|
||||
except ImportError:
|
||||
from xml.etree import ElementTree
|
||||
else:
|
||||
# py 3.3 and above selects the fastest automatically
|
||||
from xml.etree import ElementTree
|
||||
|
||||
from requests.status_codes import _codes as codes
|
||||
|
||||
import plexapi
|
||||
import requests
|
||||
import plexapi, requests
|
||||
from plexapi import TIMEOUT, log, utils
|
||||
from plexapi.exceptions import BadRequest, NotFound, Unauthorized
|
||||
from plexapi.client import PlexClient
|
||||
from plexapi.compat import ElementTree
|
||||
from plexapi.server import PlexServer
|
||||
from requests.status_codes import _codes as codes
|
||||
|
||||
|
||||
class MyPlexAccount(object):
|
||||
|
@ -90,17 +78,18 @@ class MyPlexAccount(object):
|
|||
def __repr__(self):
|
||||
return '<%s:%s:%s>' % (self.__class__.__name__, self.id, self.username.encode('utf8'))
|
||||
|
||||
def devices(self):
|
||||
""" Returns a list of all :class:`~myplex.MyPlexDevice` objects connected to the server. """
|
||||
return _listItems(MyPlexDevice.BASEURL, self.authenticationToken, MyPlexDevice)
|
||||
|
||||
def device(self, name):
|
||||
""" Returns the :class:`~myplex.MyPlexDevice` that matched the name specified.
|
||||
|
||||
* **name**: (str) Name to match against.
|
||||
Attributes:
|
||||
name (str): Name to match against.
|
||||
"""
|
||||
return _findItem(self.devices(), name)
|
||||
|
||||
def devices(self):
|
||||
""" Returns a list of all :class:`~myplex.MyPlexDevice` objects connected to the server. """
|
||||
return _listItems(MyPlexDevice.BASEURL, self.authenticationToken, MyPlexDevice)
|
||||
|
||||
def resources(self):
|
||||
"""Resources.
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ from datetime import datetime
|
|||
from plexapi.compat import quote, urlencode
|
||||
from plexapi.exceptions import NotFound, UnknownType, Unsupported
|
||||
from threading import Thread
|
||||
from plexapi import log
|
||||
|
||||
# Search Types - Plex uses these to filter specific media types when searching.
|
||||
SEARCHTYPES = {'movie': 1, 'show': 2, 'season': 3,
|
||||
|
|
Loading…
Reference in a new issue