mirror of
https://github.com/LukeHagar/plex-sdk-docs.git
synced 2025-12-06 04:20:46 +00:00
25 lines
967 B
Plaintext
25 lines
967 B
Plaintext
{/* Start Python Global Parameters */}
|
|
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
|
|
|
|
For example, you can set `X-Plex-Client-Identifier` to `'<value>'` at SDK initialization and then you do not have to pass the same value on calls to operations like `get_pin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
|
|
|
|
|
|
|
|
|
|
```python
|
|
import plex_api
|
|
|
|
s = plex_api.PlexAPI(
|
|
x_plex_client_identifier='<value>',
|
|
)
|
|
|
|
|
|
res = s.plex.get_pin(strong=False, x_plex_client_identifier='<value>')
|
|
|
|
if res.object is not None:
|
|
# handle response
|
|
pass
|
|
|
|
```
|
|
{/* End Python Global Parameters */}
|