mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 19:53:17 +00:00
Update README.md
This commit is contained in:
parent
748fc68406
commit
9a4e860d13
1 changed files with 11 additions and 11 deletions
22
README.md
22
README.md
|
@ -26,17 +26,6 @@ from plexapi.server import PlexServer
|
|||
plex = PlexServer() # Defaults to localhost:32400
|
||||
```
|
||||
|
||||
If you want to avoid logging into MyPlex and you already know your auth token
|
||||
string, you can use the PlexServer object directly as above, but passing in
|
||||
the baseurl and auth token directly.
|
||||
|
||||
```python
|
||||
from plexapi.server import MyPlexAccount
|
||||
baseurl = 'http://plexserver:32400'
|
||||
token = '2ffLuB84dqLswk9skLos'
|
||||
plex = PlexServer(baseurl, token)
|
||||
```
|
||||
|
||||
If you are running on a separate network or using Plex Users you can log
|
||||
into MyPlex to get a PlexServer instance. An example of this is below. NOTE:
|
||||
Servername below is the name of the server (not the hostname and port). If
|
||||
|
@ -49,6 +38,17 @@ account = MyPlexAccount.signin('<USERNAME>', '<PASSWORD>')
|
|||
plex = account.resource('<SERVERNAME>').connect() # returns a PlexServer instance
|
||||
```
|
||||
|
||||
If you want to avoid logging into MyPlex and you already know your auth token
|
||||
string, you can use the PlexServer object directly as above, but passing in
|
||||
the baseurl and auth token directly.
|
||||
|
||||
```python
|
||||
from plexapi.server import MyPlexAccount
|
||||
baseurl = 'http://plexserver:32400'
|
||||
token = '2ffLuB84dqLswk9skLos'
|
||||
plex = PlexServer(baseurl, token)
|
||||
```
|
||||
|
||||
|
||||
#### Usage Examples ####
|
||||
|
||||
|
|
Loading…
Reference in a new issue