mirror of
https://github.com/LukeHagar/plex-api-oauth.git
synced 2025-12-06 12:37:50 +00:00
Update README.md
This commit is contained in:
16
README.md
16
README.md
@@ -15,7 +15,7 @@ Examples Assume React Syntax
|
|||||||
|
|
||||||
The LoadPlexSession Function returns an object that contains the plexClientInformation and plexTVAuthToken keys/values according to how they were created
|
The LoadPlexSession Function returns an object that contains the plexClientInformation and plexTVAuthToken keys/values according to how they were created
|
||||||
``` JavaScript
|
``` JavaScript
|
||||||
const loadedSession = LoadPlexSession();
|
const loadedSession = LoadPlexSession();
|
||||||
if (loadedSession.plexClientInformation == null){
|
if (loadedSession.plexClientInformation == null){
|
||||||
loadedSession.plexClientInformation = CreatePlexClientInformation();
|
loadedSession.plexClientInformation = CreatePlexClientInformation();
|
||||||
}
|
}
|
||||||
@@ -48,3 +48,17 @@ const [plexTVAuthToken, setPlexTVAuthToken] = useState(
|
|||||||
SavePlexSession(plexClientInformation, tempPlexTVAuthToken);
|
SavePlexSession(plexClientInformation, tempPlexTVAuthToken);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Get Plex Music Hub data
|
||||||
|
``` JavaScript
|
||||||
|
async function UpdateHubs(plexClientInformation, plexServers, plexLibraries) {
|
||||||
|
const tempMusicHubs = await GetMusicHub(
|
||||||
|
plexClientInformation,
|
||||||
|
plexServers, // No Auth Token is needed since the server entries have their own access tokens
|
||||||
|
plexLibraries
|
||||||
|
);
|
||||||
|
setMusicHubs(tempMusicHubs);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user