plex-api-client 0.1.1__tar.gz → 0.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. plex-api-client-0.6.1/PKG-INFO +380 -0
  2. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/README.md +69 -15
  3. plex-api-client-0.6.1/setup.py +53 -0
  4. plex-api-client-0.6.1/src/plex_api/_hooks/__init__.py +5 -0
  5. plex-api-client-0.6.1/src/plex_api/_hooks/registration.py +13 -0
  6. plex-api-client-0.6.1/src/plex_api/_hooks/sdkhooks.py +57 -0
  7. plex-api-client-0.6.1/src/plex_api/_hooks/types.py +74 -0
  8. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/activities.py +65 -18
  9. plex-api-client-0.6.1/src/plex_api/authentication.py +146 -0
  10. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/butler.py +156 -43
  11. plex-api-client-0.6.1/src/plex_api/hubs.py +158 -0
  12. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/library.py +365 -115
  13. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/log.py +97 -29
  14. plex-api-client-0.6.1/src/plex_api/media.py +210 -0
  15. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/__init__.py +2 -1
  16. plex-api-client-0.6.1/src/plex_api/models/errors/getstatistics.py +32 -0
  17. plex-api-client-0.6.1/src/plex_api/models/operations/__init__.py +64 -0
  18. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getpin.py +21 -21
  19. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getserverpreferences.py +9 -25
  20. plex-api-client-0.6.1/src/plex_api/models/operations/getstatistics.py +93 -0
  21. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/gettoken.py +4 -3
  22. plex-api-client-0.6.1/src/plex_api/playlists.py +629 -0
  23. plex-api-client-0.6.1/src/plex_api/plex.py +154 -0
  24. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/sdk.py +62 -24
  25. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/sdkconfiguration.py +20 -12
  26. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/search.py +100 -31
  27. plex-api-client-0.6.1/src/plex_api/server.py +525 -0
  28. plex-api-client-0.6.1/src/plex_api/sessions.py +272 -0
  29. plex-api-client-0.6.1/src/plex_api/statistics.py +86 -0
  30. plex-api-client-0.6.1/src/plex_api/updater.py +212 -0
  31. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/utils/retries.py +2 -2
  32. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/utils/utils.py +68 -67
  33. plex-api-client-0.6.1/src/plex_api/video.py +136 -0
  34. plex-api-client-0.6.1/src/plex_api_client.egg-info/PKG-INFO +380 -0
  35. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api_client.egg-info/SOURCES.txt +8 -1
  36. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api_client.egg-info/requires.txt +1 -1
  37. plex-api-client-0.1.1/PKG-INFO +0 -326
  38. plex-api-client-0.1.1/setup.py +0 -41
  39. plex-api-client-0.1.1/src/plex_api/hubs.py +0 -110
  40. plex-api-client-0.1.1/src/plex_api/media.py +0 -142
  41. plex-api-client-0.1.1/src/plex_api/models/operations/__init__.py +0 -63
  42. plex-api-client-0.1.1/src/plex_api/playlists.py +0 -424
  43. plex-api-client-0.1.1/src/plex_api/plex.py +0 -110
  44. plex-api-client-0.1.1/src/plex_api/security.py +0 -100
  45. plex-api-client-0.1.1/src/plex_api/server.py +0 -340
  46. plex-api-client-0.1.1/src/plex_api/sessions.py +0 -179
  47. plex-api-client-0.1.1/src/plex_api/updater.py +0 -143
  48. plex-api-client-0.1.1/src/plex_api/video.py +0 -90
  49. plex-api-client-0.1.1/src/plex_api_client.egg-info/PKG-INFO +0 -326
  50. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/LICENSE.md +0 -0
  51. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/setup.cfg +0 -0
  52. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/__init__.py +0 -0
  53. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/__init__.py +0 -0
  54. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/components/__init__.py +0 -0
  55. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/components/security.py +0 -0
  56. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/addplaylistcontents.py +0 -0
  57. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/applyupdates.py +0 -0
  58. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/cancelserveractivities.py +0 -0
  59. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/checkforupdates.py +0 -0
  60. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/clearplaylistcontents.py +0 -0
  61. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/createplaylist.py +0 -0
  62. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/deletelibrary.py +0 -0
  63. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/deleteplaylist.py +0 -0
  64. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/enablepapertrail.py +0 -0
  65. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getavailableclients.py +0 -0
  66. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getbutlertasks.py +0 -0
  67. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getdevices.py +0 -0
  68. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getfilehash.py +0 -0
  69. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getglobalhubs.py +0 -0
  70. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getlibraries.py +0 -0
  71. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getlibrary.py +0 -0
  72. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getlibraryhubs.py +0 -0
  73. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getmetadata.py +0 -0
  74. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getmetadatachildren.py +0 -0
  75. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getmyplexaccount.py +0 -0
  76. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getondeck.py +0 -0
  77. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getpin.py +0 -0
  78. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getplaylist.py +0 -0
  79. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getplaylistcontents.py +0 -0
  80. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getplaylists.py +0 -0
  81. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getrecentlyadded.py +0 -0
  82. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getresizedphoto.py +0 -0
  83. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getsearchresults.py +0 -0
  84. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getserveractivities.py +0 -0
  85. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getservercapabilities.py +0 -0
  86. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getserveridentity.py +0 -0
  87. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getserverlist.py +0 -0
  88. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getserverpreferences.py +0 -0
  89. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getsessionhistory.py +0 -0
  90. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getsessions.py +0 -0
  91. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getsourceconnectioninformation.py +0 -0
  92. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/gettimeline.py +0 -0
  93. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/gettoken.py +0 -0
  94. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/gettranscodesessions.py +0 -0
  95. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/gettransienttoken.py +0 -0
  96. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/getupdatestatus.py +0 -0
  97. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/logline.py +0 -0
  98. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/logmultiline.py +0 -0
  99. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/markplayed.py +0 -0
  100. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/markunplayed.py +0 -0
  101. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/performsearch.py +0 -0
  102. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/performvoicesearch.py +0 -0
  103. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/refreshlibrary.py +0 -0
  104. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/sdkerror.py +0 -0
  105. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/startalltasks.py +0 -0
  106. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/starttask.py +0 -0
  107. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/startuniversaltranscode.py +0 -0
  108. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/stopalltasks.py +0 -0
  109. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/stoptask.py +0 -0
  110. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/stoptranscodesession.py +0 -0
  111. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/updateplaylist.py +0 -0
  112. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/updateplayprogress.py +0 -0
  113. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/errors/uploadplaylist.py +0 -0
  114. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/addplaylistcontents.py +12 -12
  115. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/applyupdates.py +4 -4
  116. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/cancelserveractivities.py +2 -2
  117. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/checkforupdates.py +2 -2
  118. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/clearplaylistcontents.py +2 -2
  119. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/createplaylist.py +16 -16
  120. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/deletelibrary.py +2 -2
  121. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/deleteplaylist.py +2 -2
  122. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/enablepapertrail.py +2 -2
  123. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getavailableclients.py +10 -10
  124. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getbutlertasks.py +5 -5
  125. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getdevices.py +6 -6
  126. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getfilehash.py +2 -2
  127. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getglobalhubs.py +23 -23
  128. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getlibraries.py +17 -17
  129. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getlibrary.py +14 -14
  130. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getlibraryhubs.py +53 -53
  131. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getlibraryitems.py +61 -61
  132. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getmetadata.py +67 -67
  133. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getmetadatachildren.py +26 -26
  134. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getmyplexaccount.py +8 -8
  135. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getondeck.py +55 -55
  136. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getplaylist.py +13 -13
  137. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getplaylistcontents.py +44 -44
  138. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getplaylists.py +14 -14
  139. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getrecentlyadded.py +39 -39
  140. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getresizedphoto.py +7 -7
  141. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getsearchresults.py +38 -38
  142. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getserveractivities.py +9 -9
  143. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getservercapabilities.py +4 -4
  144. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getserveridentity.py +3 -3
  145. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getserverlist.py +6 -6
  146. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getsessionhistory.py +15 -15
  147. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getsessions.py +16 -16
  148. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getsourceconnectioninformation.py +2 -2
  149. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/gettimeline.py +16 -16
  150. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/gettranscodesessions.py +20 -20
  151. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/gettransienttoken.py +4 -4
  152. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/getupdatestatus.py +7 -7
  153. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/logline.py +2 -2
  154. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/logmultiline.py +2 -2
  155. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/markplayed.py +2 -2
  156. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/markunplayed.py +2 -2
  157. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/performsearch.py +4 -4
  158. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/performvoicesearch.py +4 -4
  159. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/refreshlibrary.py +2 -2
  160. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/searchlibrary.py +17 -17
  161. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/startalltasks.py +2 -2
  162. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/starttask.py +2 -2
  163. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/startuniversaltranscode.py +16 -16
  164. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/stopalltasks.py +2 -2
  165. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/stoptask.py +2 -2
  166. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/stoptranscodesession.py +2 -2
  167. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/updateplaylist.py +4 -4
  168. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/updateplayprogress.py +4 -4
  169. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/models/operations/uploadplaylist.py +8 -8
  170. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api/utils/__init__.py +0 -0
  171. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api_client.egg-info/dependency_links.txt +0 -0
  172. {plex-api-client-0.1.1 → plex-api-client-0.6.1}/src/plex_api_client.egg-info/top_level.txt +0 -0
@@ -0,0 +1,380 @@
1
+ Metadata-Version: 2.1
2
+ Name: plex-api-client
3
+ Version: 0.6.1
4
+ Summary: Python Client SDK Generated by Speakeasy
5
+ Home-page: https://github.com/LukeHagar/plexpy.git
6
+ Author: LukeHagar
7
+ License: UNKNOWN
8
+ Description: # plexpy
9
+
10
+ <div align="left">
11
+ <a href="https://speakeasyapi.dev/"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
12
+ <a href="https://opensource.org/licenses/MIT">
13
+ <img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
14
+ </a>
15
+ </div>
16
+
17
+ <!-- Start SDK Installation [installation] -->
18
+ ## SDK Installation
19
+
20
+ ```bash
21
+ pip install plex-api-client
22
+ ```
23
+ <!-- End SDK Installation [installation] -->
24
+
25
+ <!-- Start SDK Example Usage [usage] -->
26
+ ## SDK Example Usage
27
+
28
+ ### Example
29
+
30
+ ```python
31
+ import plex_api
32
+
33
+ s = plex_api.PlexAPI(
34
+ access_token="<YOUR_API_KEY_HERE>",
35
+ x_plex_client_identifier='<value>',
36
+ )
37
+
38
+
39
+ res = s.server.get_server_capabilities()
40
+
41
+ if res.object is not None:
42
+ # handle response
43
+ pass
44
+
45
+ ```
46
+ <!-- End SDK Example Usage [usage] -->
47
+
48
+ <!-- Start Available Resources and Operations [operations] -->
49
+ ## Available Resources and Operations
50
+
51
+ ### [server](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/server/README.md)
52
+
53
+ * [get_server_capabilities](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/server/README.md#get_server_capabilities) - Server Capabilities
54
+ * [get_server_preferences](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/server/README.md#get_server_preferences) - Get Server Preferences
55
+ * [get_available_clients](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/server/README.md#get_available_clients) - Get Available Clients
56
+ * [get_devices](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/server/README.md#get_devices) - Get Devices
57
+ * [get_server_identity](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/server/README.md#get_server_identity) - Get Server Identity
58
+ * [get_my_plex_account](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/server/README.md#get_my_plex_account) - Get MyPlex Account
59
+ * [get_resized_photo](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/server/README.md#get_resized_photo) - Get a Resized Photo
60
+ * [get_server_list](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/server/README.md#get_server_list) - Get Server List
61
+
62
+ ### [media](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/media/README.md)
63
+
64
+ * [mark_played](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/media/README.md#mark_played) - Mark Media Played
65
+ * [mark_unplayed](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/media/README.md#mark_unplayed) - Mark Media Unplayed
66
+ * [update_play_progress](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/media/README.md#update_play_progress) - Update Media Play Progress
67
+
68
+ ### [video](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/video/README.md)
69
+
70
+ * [get_timeline](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/video/README.md#get_timeline) - Get the timeline for a media item
71
+ * [start_universal_transcode](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/video/README.md#start_universal_transcode) - Start Universal Transcode
72
+
73
+ ### [activities](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/activities/README.md)
74
+
75
+ * [get_server_activities](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/activities/README.md#get_server_activities) - Get Server Activities
76
+ * [cancel_server_activities](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/activities/README.md#cancel_server_activities) - Cancel Server Activities
77
+
78
+ ### [butler](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/butler/README.md)
79
+
80
+ * [get_butler_tasks](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/butler/README.md#get_butler_tasks) - Get Butler tasks
81
+ * [start_all_tasks](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/butler/README.md#start_all_tasks) - Start all Butler tasks
82
+ * [stop_all_tasks](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/butler/README.md#stop_all_tasks) - Stop all Butler tasks
83
+ * [start_task](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/butler/README.md#start_task) - Start a single Butler task
84
+ * [stop_task](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/butler/README.md#stop_task) - Stop a single Butler task
85
+
86
+ ### [hubs](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/hubs/README.md)
87
+
88
+ * [get_global_hubs](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/hubs/README.md#get_global_hubs) - Get Global Hubs
89
+ * [get_library_hubs](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/hubs/README.md#get_library_hubs) - Get library specific hubs
90
+
91
+ ### [search](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/search/README.md)
92
+
93
+ * [perform_search](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/search/README.md#perform_search) - Perform a search
94
+ * [perform_voice_search](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/search/README.md#perform_voice_search) - Perform a voice search
95
+ * [get_search_results](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/search/README.md#get_search_results) - Get Search Results
96
+
97
+ ### [library](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md)
98
+
99
+ * [get_file_hash](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#get_file_hash) - Get Hash Value
100
+ * [get_recently_added](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#get_recently_added) - Get Recently Added
101
+ * [get_libraries](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#get_libraries) - Get All Libraries
102
+ * [get_library](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#get_library) - Get Library Details
103
+ * [delete_library](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#delete_library) - Delete Library Section
104
+ * [get_library_items](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#get_library_items) - Get Library Items
105
+ * [refresh_library](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#refresh_library) - Refresh Library
106
+ * [search_library](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#search_library) - Search Library
107
+ * [get_metadata](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#get_metadata) - Get Items Metadata
108
+ * [get_metadata_children](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#get_metadata_children) - Get Items Children
109
+ * [get_on_deck](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/library/README.md#get_on_deck) - Get On Deck
110
+
111
+ ### [log](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/log/README.md)
112
+
113
+ * [log_line](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/log/README.md#log_line) - Logging a single line message.
114
+ * [log_multi_line](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/log/README.md#log_multi_line) - Logging a multi-line message
115
+ * [enable_paper_trail](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/log/README.md#enable_paper_trail) - Enabling Papertrail
116
+
117
+ ### [plex](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/plex/README.md)
118
+
119
+ * [get_pin](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/plex/README.md#get_pin) - Get a Pin
120
+ * [get_token](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/plex/README.md#get_token) - Get Access Token
121
+
122
+ ### [playlists](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/playlists/README.md)
123
+
124
+ * [create_playlist](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/playlists/README.md#create_playlist) - Create a Playlist
125
+ * [get_playlists](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/playlists/README.md#get_playlists) - Get All Playlists
126
+ * [get_playlist](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/playlists/README.md#get_playlist) - Retrieve Playlist
127
+ * [delete_playlist](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/playlists/README.md#delete_playlist) - Deletes a Playlist
128
+ * [update_playlist](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/playlists/README.md#update_playlist) - Update a Playlist
129
+ * [get_playlist_contents](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/playlists/README.md#get_playlist_contents) - Retrieve Playlist Contents
130
+ * [clear_playlist_contents](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/playlists/README.md#clear_playlist_contents) - Delete Playlist Contents
131
+ * [add_playlist_contents](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/playlists/README.md#add_playlist_contents) - Adding to a Playlist
132
+ * [upload_playlist](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/playlists/README.md#upload_playlist) - Upload Playlist
133
+
134
+ ### [authentication](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/authentication/README.md)
135
+
136
+ * [get_transient_token](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/authentication/README.md#get_transient_token) - Get a Transient Token.
137
+ * [get_source_connection_information](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/authentication/README.md#get_source_connection_information) - Get Source Connection Information
138
+
139
+ ### [statistics](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/statistics/README.md)
140
+
141
+ * [get_statistics](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/statistics/README.md#get_statistics) - Get Media Statistics
142
+
143
+ ### [sessions](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/sessions/README.md)
144
+
145
+ * [get_sessions](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/sessions/README.md#get_sessions) - Get Active Sessions
146
+ * [get_session_history](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/sessions/README.md#get_session_history) - Get Session History
147
+ * [get_transcode_sessions](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/sessions/README.md#get_transcode_sessions) - Get Transcode Sessions
148
+ * [stop_transcode_session](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/sessions/README.md#stop_transcode_session) - Stop a Transcode Session
149
+
150
+ ### [updater](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/updater/README.md)
151
+
152
+ * [get_update_status](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/updater/README.md#get_update_status) - Querying status of updates
153
+ * [check_for_updates](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/updater/README.md#check_for_updates) - Checking for updates
154
+ * [apply_updates](https://github.com/LukeHagar/plexpy/blob/master/docs/sdks/updater/README.md#apply_updates) - Apply Updates
155
+ <!-- End Available Resources and Operations [operations] -->
156
+
157
+ <!-- Start Error Handling [errors] -->
158
+ ## Error Handling
159
+
160
+ Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
161
+
162
+ | Error Object | Status Code | Content Type |
163
+ | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
164
+ | errors.GetServerCapabilitiesResponseBody | 401 | application/json |
165
+ | errors.SDKError | 4xx-5xx | */* |
166
+
167
+ ### Example
168
+
169
+ ```python
170
+ import plex_api
171
+ from plex_api.models import errors
172
+
173
+ s = plex_api.PlexAPI(
174
+ access_token="<YOUR_API_KEY_HERE>",
175
+ x_plex_client_identifier='<value>',
176
+ )
177
+
178
+
179
+ res = None
180
+ try:
181
+ res = s.server.get_server_capabilities()
182
+ except errors.GetServerCapabilitiesResponseBody as e:
183
+ # handle exception
184
+ raise(e)
185
+ except errors.SDKError as e:
186
+ # handle exception
187
+ raise(e)
188
+
189
+ if res.object is not None:
190
+ # handle response
191
+ pass
192
+
193
+ ```
194
+ <!-- End Error Handling [errors] -->
195
+
196
+ <!-- Start Server Selection [server] -->
197
+ ## Server Selection
198
+
199
+ ### Select Server by Index
200
+
201
+ You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
202
+
203
+ | # | Server | Variables |
204
+ | - | ------ | --------- |
205
+ | 0 | `{protocol}://{ip}:{port}` | `protocol` (default is `http`), `ip` (default is `10.10.10.47`), `port` (default is `32400`) |
206
+
207
+ #### Example
208
+
209
+ ```python
210
+ import plex_api
211
+
212
+ s = plex_api.PlexAPI(
213
+ server_idx=0,
214
+ access_token="<YOUR_API_KEY_HERE>",
215
+ x_plex_client_identifier='<value>',
216
+ )
217
+
218
+
219
+ res = s.server.get_server_capabilities()
220
+
221
+ if res.object is not None:
222
+ # handle response
223
+ pass
224
+
225
+ ```
226
+
227
+ #### Variables
228
+
229
+ Some of the server options above contain variables. If you want to set the values of those variables, the following optional parameters are available when initializing the SDK client instance:
230
+ * `protocol: models.ServerProtocol`
231
+ * `ip: str`
232
+ * `port: str`
233
+
234
+ ### Override Server URL Per-Client
235
+
236
+ The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
237
+ ```python
238
+ import plex_api
239
+
240
+ s = plex_api.PlexAPI(
241
+ server_url="{protocol}://{ip}:{port}",
242
+ access_token="<YOUR_API_KEY_HERE>",
243
+ x_plex_client_identifier='<value>',
244
+ )
245
+
246
+
247
+ res = s.server.get_server_capabilities()
248
+
249
+ if res.object is not None:
250
+ # handle response
251
+ pass
252
+
253
+ ```
254
+
255
+ ### Override Server URL Per-Operation
256
+
257
+ The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
258
+ ```python
259
+ import plex_api
260
+
261
+ s = plex_api.PlexAPI(
262
+ x_plex_client_identifier='<value>',
263
+ )
264
+
265
+
266
+ res = s.plex.get_pin(server_url="https://plex.tv/api/v2", strong=False, x_plex_client_identifier='<value>')
267
+
268
+ if res.object is not None:
269
+ # handle response
270
+ pass
271
+
272
+ ```
273
+ <!-- End Server Selection [server] -->
274
+
275
+ <!-- Start Custom HTTP Client [http-client] -->
276
+ ## Custom HTTP Client
277
+
278
+ The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
279
+
280
+ For example, you could specify a header for every request that this sdk makes as follows:
281
+ ```python
282
+ import plex_api
283
+ import requests
284
+
285
+ http_client = requests.Session()
286
+ http_client.headers.update({'x-custom-header': 'someValue'})
287
+ s = plex_api.PlexAPI(client=http_client)
288
+ ```
289
+ <!-- End Custom HTTP Client [http-client] -->
290
+
291
+ <!-- Start Authentication [security] -->
292
+ ## Authentication
293
+
294
+ ### Per-Client Security Schemes
295
+
296
+ This SDK supports the following security scheme globally:
297
+
298
+ | Name | Type | Scheme |
299
+ | -------------- | -------------- | -------------- |
300
+ | `access_token` | apiKey | API key |
301
+
302
+ To authenticate with the API the `access_token` parameter must be set when initializing the SDK client instance. For example:
303
+ ```python
304
+ import plex_api
305
+
306
+ s = plex_api.PlexAPI(
307
+ access_token="<YOUR_API_KEY_HERE>",
308
+ x_plex_client_identifier='<value>',
309
+ )
310
+
311
+
312
+ res = s.server.get_server_capabilities()
313
+
314
+ if res.object is not None:
315
+ # handle response
316
+ pass
317
+
318
+ ```
319
+ <!-- End Authentication [security] -->
320
+
321
+ <!-- Start Global Parameters [global-parameters] -->
322
+ ## Global Parameters
323
+
324
+ 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.
325
+
326
+ 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.
327
+
328
+
329
+ ### Available Globals
330
+
331
+ The following global parameter is available. The required parameter must be set when you initialize the SDK client.
332
+
333
+ | Name | Type | Required | Description |
334
+ | ---- | ---- |:--------:| ----------- |
335
+ | x_plex_client_identifier | str | ✔️ | The unique identifier for the client application
336
+ This is used to track the client application and its usage
337
+ (UUID, serial number, or other number unique per device)
338
+ |
339
+
340
+
341
+ ### Example
342
+
343
+ ```python
344
+ import plex_api
345
+
346
+ s = plex_api.PlexAPI(
347
+ x_plex_client_identifier='<value>',
348
+ )
349
+
350
+
351
+ res = s.plex.get_pin(strong=False, x_plex_client_identifier='<value>')
352
+
353
+ if res.object is not None:
354
+ # handle response
355
+ pass
356
+
357
+ ```
358
+ <!-- End Global Parameters [global-parameters] -->
359
+
360
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
361
+
362
+ # Development
363
+
364
+ ## Maturity
365
+
366
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
367
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
368
+ looking for the latest version.
369
+
370
+ ## Contributions
371
+
372
+ While we value open-source contributions to this SDK, this library is generated programmatically.
373
+ Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!
374
+
375
+ ### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
376
+
377
+ Platform: UNKNOWN
378
+ Requires-Python: >=3.8
379
+ Description-Content-Type: text/markdown
380
+ Provides-Extra: dev
@@ -25,6 +25,7 @@ import plex_api
25
25
 
26
26
  s = plex_api.PlexAPI(
27
27
  access_token="<YOUR_API_KEY_HERE>",
28
+ x_plex_client_identifier='<value>',
28
29
  )
29
30
 
30
31
 
@@ -33,6 +34,7 @@ res = s.server.get_server_capabilities()
33
34
  if res.object is not None:
34
35
  # handle response
35
36
  pass
37
+
36
38
  ```
37
39
  <!-- End SDK Example Usage [usage] -->
38
40
 
@@ -56,6 +58,11 @@ if res.object is not None:
56
58
  * [mark_unplayed](docs/sdks/media/README.md#mark_unplayed) - Mark Media Unplayed
57
59
  * [update_play_progress](docs/sdks/media/README.md#update_play_progress) - Update Media Play Progress
58
60
 
61
+ ### [video](docs/sdks/video/README.md)
62
+
63
+ * [get_timeline](docs/sdks/video/README.md#get_timeline) - Get the timeline for a media item
64
+ * [start_universal_transcode](docs/sdks/video/README.md#start_universal_transcode) - Start Universal Transcode
65
+
59
66
  ### [activities](docs/sdks/activities/README.md)
60
67
 
61
68
  * [get_server_activities](docs/sdks/activities/README.md#get_server_activities) - Get Server Activities
@@ -117,10 +124,14 @@ if res.object is not None:
117
124
  * [add_playlist_contents](docs/sdks/playlists/README.md#add_playlist_contents) - Adding to a Playlist
118
125
  * [upload_playlist](docs/sdks/playlists/README.md#upload_playlist) - Upload Playlist
119
126
 
120
- ### [security](docs/sdks/security/README.md)
127
+ ### [authentication](docs/sdks/authentication/README.md)
121
128
 
122
- * [get_transient_token](docs/sdks/security/README.md#get_transient_token) - Get a Transient Token.
123
- * [get_source_connection_information](docs/sdks/security/README.md#get_source_connection_information) - Get Source Connection Information
129
+ * [get_transient_token](docs/sdks/authentication/README.md#get_transient_token) - Get a Transient Token.
130
+ * [get_source_connection_information](docs/sdks/authentication/README.md#get_source_connection_information) - Get Source Connection Information
131
+
132
+ ### [statistics](docs/sdks/statistics/README.md)
133
+
134
+ * [get_statistics](docs/sdks/statistics/README.md#get_statistics) - Get Media Statistics
124
135
 
125
136
  ### [sessions](docs/sdks/sessions/README.md)
126
137
 
@@ -134,11 +145,6 @@ if res.object is not None:
134
145
  * [get_update_status](docs/sdks/updater/README.md#get_update_status) - Querying status of updates
135
146
  * [check_for_updates](docs/sdks/updater/README.md#check_for_updates) - Checking for updates
136
147
  * [apply_updates](docs/sdks/updater/README.md#apply_updates) - Apply Updates
137
-
138
- ### [video](docs/sdks/video/README.md)
139
-
140
- * [start_universal_transcode](docs/sdks/video/README.md#start_universal_transcode) - Start Universal Transcode
141
- * [get_timeline](docs/sdks/video/README.md#get_timeline) - Get the timeline for a media item
142
148
  <!-- End Available Resources and Operations [operations] -->
143
149
 
144
150
  <!-- Start Error Handling [errors] -->
@@ -149,15 +155,17 @@ Handling errors in this SDK should largely match your expectations. All operati
149
155
  | Error Object | Status Code | Content Type |
150
156
  | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
151
157
  | errors.GetServerCapabilitiesResponseBody | 401 | application/json |
152
- | errors.SDKError | 4x-5xx | */* |
158
+ | errors.SDKError | 4xx-5xx | */* |
153
159
 
154
160
  ### Example
155
161
 
156
162
  ```python
157
163
  import plex_api
164
+ from plex_api.models import errors
158
165
 
159
166
  s = plex_api.PlexAPI(
160
167
  access_token="<YOUR_API_KEY_HERE>",
168
+ x_plex_client_identifier='<value>',
161
169
  )
162
170
 
163
171
 
@@ -165,15 +173,16 @@ res = None
165
173
  try:
166
174
  res = s.server.get_server_capabilities()
167
175
  except errors.GetServerCapabilitiesResponseBody as e:
168
- print(e) # handle exception
176
+ # handle exception
169
177
  raise(e)
170
178
  except errors.SDKError as e:
171
- print(e) # handle exception
179
+ # handle exception
172
180
  raise(e)
173
181
 
174
182
  if res.object is not None:
175
183
  # handle response
176
184
  pass
185
+
177
186
  ```
178
187
  <!-- End Error Handling [errors] -->
179
188
 
@@ -196,6 +205,7 @@ import plex_api
196
205
  s = plex_api.PlexAPI(
197
206
  server_idx=0,
198
207
  access_token="<YOUR_API_KEY_HERE>",
208
+ x_plex_client_identifier='<value>',
199
209
  )
200
210
 
201
211
 
@@ -204,6 +214,7 @@ res = s.server.get_server_capabilities()
204
214
  if res.object is not None:
205
215
  # handle response
206
216
  pass
217
+
207
218
  ```
208
219
 
209
220
  #### Variables
@@ -222,6 +233,7 @@ import plex_api
222
233
  s = plex_api.PlexAPI(
223
234
  server_url="{protocol}://{ip}:{port}",
224
235
  access_token="<YOUR_API_KEY_HERE>",
236
+ x_plex_client_identifier='<value>',
225
237
  )
226
238
 
227
239
 
@@ -230,6 +242,7 @@ res = s.server.get_server_capabilities()
230
242
  if res.object is not None:
231
243
  # handle response
232
244
  pass
245
+
233
246
  ```
234
247
 
235
248
  ### Override Server URL Per-Operation
@@ -237,18 +250,18 @@ if res.object is not None:
237
250
  The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
238
251
  ```python
239
252
  import plex_api
240
- from plex_api.models import operations
241
253
 
242
254
  s = plex_api.PlexAPI(
243
- access_token="<YOUR_API_KEY_HERE>",
255
+ x_plex_client_identifier='<value>',
244
256
  )
245
257
 
246
258
 
247
- res = s.plex.get_pin(server_url="https://plex.tv/api/v2", x_plex_client_identifier='string', strong=False)
259
+ res = s.plex.get_pin(server_url="https://plex.tv/api/v2", strong=False, x_plex_client_identifier='<value>')
248
260
 
249
261
  if res.object is not None:
250
262
  # handle response
251
263
  pass
264
+
252
265
  ```
253
266
  <!-- End Server Selection [server] -->
254
267
 
@@ -264,7 +277,7 @@ import requests
264
277
 
265
278
  http_client = requests.Session()
266
279
  http_client.headers.update({'x-custom-header': 'someValue'})
267
- s = plex_api.PlexAPI(client: http_client)
280
+ s = plex_api.PlexAPI(client=http_client)
268
281
  ```
269
282
  <!-- End Custom HTTP Client [http-client] -->
270
283
 
@@ -285,6 +298,7 @@ import plex_api
285
298
 
286
299
  s = plex_api.PlexAPI(
287
300
  access_token="<YOUR_API_KEY_HERE>",
301
+ x_plex_client_identifier='<value>',
288
302
  )
289
303
 
290
304
 
@@ -293,9 +307,49 @@ res = s.server.get_server_capabilities()
293
307
  if res.object is not None:
294
308
  # handle response
295
309
  pass
310
+
296
311
  ```
297
312
  <!-- End Authentication [security] -->
298
313
 
314
+ <!-- Start Global Parameters [global-parameters] -->
315
+ ## Global Parameters
316
+
317
+ 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.
318
+
319
+ 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.
320
+
321
+
322
+ ### Available Globals
323
+
324
+ The following global parameter is available. The required parameter must be set when you initialize the SDK client.
325
+
326
+ | Name | Type | Required | Description |
327
+ | ---- | ---- |:--------:| ----------- |
328
+ | x_plex_client_identifier | str | ✔️ | The unique identifier for the client application
329
+ This is used to track the client application and its usage
330
+ (UUID, serial number, or other number unique per device)
331
+ |
332
+
333
+
334
+ ### Example
335
+
336
+ ```python
337
+ import plex_api
338
+
339
+ s = plex_api.PlexAPI(
340
+ x_plex_client_identifier='<value>',
341
+ )
342
+
343
+
344
+ res = s.plex.get_pin(strong=False, x_plex_client_identifier='<value>')
345
+
346
+ if res.object is not None:
347
+ # handle response
348
+ pass
349
+
350
+ ```
351
+ <!-- End Global Parameters [global-parameters] -->
352
+
299
353
  <!-- Placeholder for Future Speakeasy SDK Sections -->
300
354
 
301
355
  # Development
@@ -0,0 +1,53 @@
1
+ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
2
+
3
+ import setuptools
4
+ import re
5
+
6
+ try:
7
+ with open('README.md', 'r') as fh:
8
+ long_description = fh.read()
9
+ GITHUB_URL = 'https://github.com/LukeHagar/plexpy.git'
10
+ GITHUB_URL = GITHUB_URL[: -len('.git')] if GITHUB_URL.endswith('.git') else GITHUB_URL
11
+ # links on PyPI should have absolute URLs
12
+ long_description = re.sub(
13
+ r'(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))',
14
+ lambda m: m.group(1) + GITHUB_URL + '/blob/master/' + m.group(2) + m.group(3),
15
+ long_description,
16
+ )
17
+ except FileNotFoundError:
18
+ long_description = ''
19
+
20
+ setuptools.setup(
21
+ name='plex-api-client',
22
+ version='0.6.1',
23
+ author='LukeHagar',
24
+ description='Python Client SDK Generated by Speakeasy',
25
+ url='https://github.com/LukeHagar/plexpy.git',
26
+ long_description=long_description,
27
+ long_description_content_type='text/markdown',
28
+ packages=setuptools.find_packages(where='src'),
29
+ install_requires=[
30
+ "certifi>=2023.7.22",
31
+ "charset-normalizer>=3.2.0",
32
+ "dataclasses-json>=0.6.4",
33
+ "idna>=3.4",
34
+ "jsonpath-python>=1.0.6",
35
+ "marshmallow>=3.19.0",
36
+ "mypy-extensions>=1.0.0",
37
+ "packaging>=23.1",
38
+ "python-dateutil>=2.8.2",
39
+ "requests>=2.31.0",
40
+ "six>=1.16.0",
41
+ "typing-inspect>=0.9.0",
42
+ "typing_extensions>=4.7.1",
43
+ "urllib3>=1.26.18",
44
+ ],
45
+ extras_require={
46
+ "dev": [
47
+ "pylint==2.16.2",
48
+ ],
49
+ },
50
+ package_dir={'': 'src'},
51
+ python_requires='>=3.8',
52
+ package_data={'plex-api-client': ['py.typed']},
53
+ )
@@ -0,0 +1,5 @@
1
+ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
2
+
3
+ from .sdkhooks import *
4
+ from .types import *
5
+ from .registration import *
@@ -0,0 +1,13 @@
1
+ from .types import Hooks
2
+
3
+
4
+ # This file is only ever generated once on the first generation and then is free to be modified.
5
+ # Any hooks you wish to add should be registered in the init_hooks function. Feel free to define them
6
+ # in this file or in separate files in the hooks folder.
7
+
8
+
9
+ def init_hooks(hooks: Hooks):
10
+ # pylint: disable=unused-argument
11
+ """Add hooks by calling hooks.register{sdk_init/before_request/after_success/after_error}Hook
12
+ with an instance of a hook that implements that specific Hook interface
13
+ Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance"""