plex-api-client 0.2.0__tar.gz → 0.6.0__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 (168) hide show
  1. {plex-api-client-0.2.0/src/plex_api_client.egg-info → plex-api-client-0.6.0}/PKG-INFO +59 -9
  2. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/README.md +57 -7
  3. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/setup.py +7 -4
  4. plex-api-client-0.6.0/src/plex_api/_hooks/__init__.py +5 -0
  5. plex-api-client-0.6.0/src/plex_api/_hooks/registration.py +13 -0
  6. plex-api-client-0.6.0/src/plex_api/_hooks/sdkhooks.py +57 -0
  7. plex-api-client-0.6.0/src/plex_api/_hooks/types.py +74 -0
  8. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/activities.py +65 -18
  9. plex-api-client-0.6.0/src/plex_api/authentication.py +146 -0
  10. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/butler.py +156 -43
  11. plex-api-client-0.6.0/src/plex_api/hubs.py +158 -0
  12. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/library.py +365 -115
  13. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/log.py +97 -29
  14. plex-api-client-0.6.0/src/plex_api/media.py +210 -0
  15. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getpin.py +5 -5
  16. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/gettoken.py +2 -1
  17. plex-api-client-0.6.0/src/plex_api/playlists.py +629 -0
  18. plex-api-client-0.6.0/src/plex_api/plex.py +154 -0
  19. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/sdk.py +52 -18
  20. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/sdkconfiguration.py +15 -8
  21. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/search.py +100 -31
  22. plex-api-client-0.6.0/src/plex_api/server.py +525 -0
  23. plex-api-client-0.6.0/src/plex_api/sessions.py +272 -0
  24. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/statistics.py +35 -10
  25. plex-api-client-0.6.0/src/plex_api/updater.py +212 -0
  26. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/utils/retries.py +2 -2
  27. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/utils/utils.py +68 -67
  28. plex-api-client-0.6.0/src/plex_api/video.py +136 -0
  29. {plex-api-client-0.2.0 → plex-api-client-0.6.0/src/plex_api_client.egg-info}/PKG-INFO +59 -9
  30. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api_client.egg-info/SOURCES.txt +5 -1
  31. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api_client.egg-info/requires.txt +1 -1
  32. plex-api-client-0.2.0/src/plex_api/hubs.py +0 -110
  33. plex-api-client-0.2.0/src/plex_api/media.py +0 -142
  34. plex-api-client-0.2.0/src/plex_api/playlists.py +0 -424
  35. plex-api-client-0.2.0/src/plex_api/plex.py +0 -110
  36. plex-api-client-0.2.0/src/plex_api/security.py +0 -100
  37. plex-api-client-0.2.0/src/plex_api/server.py +0 -340
  38. plex-api-client-0.2.0/src/plex_api/sessions.py +0 -179
  39. plex-api-client-0.2.0/src/plex_api/updater.py +0 -143
  40. plex-api-client-0.2.0/src/plex_api/video.py +0 -90
  41. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/LICENSE.md +0 -0
  42. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/setup.cfg +0 -0
  43. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/__init__.py +0 -0
  44. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/__init__.py +0 -0
  45. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/components/__init__.py +0 -0
  46. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/components/security.py +0 -0
  47. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/__init__.py +0 -0
  48. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/addplaylistcontents.py +0 -0
  49. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/applyupdates.py +0 -0
  50. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/cancelserveractivities.py +0 -0
  51. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/checkforupdates.py +0 -0
  52. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/clearplaylistcontents.py +0 -0
  53. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/createplaylist.py +0 -0
  54. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/deletelibrary.py +0 -0
  55. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/deleteplaylist.py +0 -0
  56. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/enablepapertrail.py +0 -0
  57. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getavailableclients.py +0 -0
  58. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getbutlertasks.py +0 -0
  59. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getdevices.py +0 -0
  60. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getfilehash.py +0 -0
  61. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getglobalhubs.py +0 -0
  62. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getlibraries.py +0 -0
  63. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getlibrary.py +0 -0
  64. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getlibraryhubs.py +0 -0
  65. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getmetadata.py +0 -0
  66. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getmetadatachildren.py +0 -0
  67. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getmyplexaccount.py +0 -0
  68. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getondeck.py +0 -0
  69. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getpin.py +0 -0
  70. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getplaylist.py +0 -0
  71. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getplaylistcontents.py +0 -0
  72. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getplaylists.py +0 -0
  73. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getrecentlyadded.py +0 -0
  74. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getresizedphoto.py +0 -0
  75. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getsearchresults.py +0 -0
  76. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getserveractivities.py +0 -0
  77. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getservercapabilities.py +0 -0
  78. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getserveridentity.py +0 -0
  79. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getserverlist.py +0 -0
  80. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getserverpreferences.py +0 -0
  81. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getsessionhistory.py +0 -0
  82. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getsessions.py +0 -0
  83. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getsourceconnectioninformation.py +0 -0
  84. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getstatistics.py +0 -0
  85. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/gettimeline.py +0 -0
  86. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/gettoken.py +0 -0
  87. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/gettranscodesessions.py +0 -0
  88. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/gettransienttoken.py +0 -0
  89. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/getupdatestatus.py +0 -0
  90. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/logline.py +0 -0
  91. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/logmultiline.py +0 -0
  92. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/markplayed.py +0 -0
  93. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/markunplayed.py +0 -0
  94. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/performsearch.py +0 -0
  95. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/performvoicesearch.py +0 -0
  96. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/refreshlibrary.py +0 -0
  97. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/sdkerror.py +0 -0
  98. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/startalltasks.py +0 -0
  99. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/starttask.py +0 -0
  100. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/startuniversaltranscode.py +0 -0
  101. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/stopalltasks.py +0 -0
  102. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/stoptask.py +0 -0
  103. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/stoptranscodesession.py +0 -0
  104. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/updateplaylist.py +0 -0
  105. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/updateplayprogress.py +0 -0
  106. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/errors/uploadplaylist.py +0 -0
  107. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/__init__.py +0 -0
  108. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/addplaylistcontents.py +0 -0
  109. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/applyupdates.py +0 -0
  110. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/cancelserveractivities.py +0 -0
  111. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/checkforupdates.py +0 -0
  112. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/clearplaylistcontents.py +0 -0
  113. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/createplaylist.py +0 -0
  114. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/deletelibrary.py +0 -0
  115. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/deleteplaylist.py +0 -0
  116. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/enablepapertrail.py +0 -0
  117. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getavailableclients.py +0 -0
  118. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getbutlertasks.py +0 -0
  119. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getdevices.py +0 -0
  120. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getfilehash.py +0 -0
  121. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getglobalhubs.py +0 -0
  122. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getlibraries.py +0 -0
  123. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getlibrary.py +0 -0
  124. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getlibraryhubs.py +0 -0
  125. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getlibraryitems.py +0 -0
  126. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getmetadata.py +0 -0
  127. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getmetadatachildren.py +0 -0
  128. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getmyplexaccount.py +0 -0
  129. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getondeck.py +0 -0
  130. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getplaylist.py +0 -0
  131. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getplaylistcontents.py +0 -0
  132. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getplaylists.py +0 -0
  133. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getrecentlyadded.py +0 -0
  134. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getresizedphoto.py +0 -0
  135. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getsearchresults.py +0 -0
  136. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getserveractivities.py +0 -0
  137. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getservercapabilities.py +0 -0
  138. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getserveridentity.py +0 -0
  139. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getserverlist.py +0 -0
  140. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getserverpreferences.py +0 -0
  141. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getsessionhistory.py +0 -0
  142. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getsessions.py +0 -0
  143. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getsourceconnectioninformation.py +0 -0
  144. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getstatistics.py +0 -0
  145. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/gettimeline.py +0 -0
  146. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/gettranscodesessions.py +0 -0
  147. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/gettransienttoken.py +0 -0
  148. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/getupdatestatus.py +0 -0
  149. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/logline.py +0 -0
  150. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/logmultiline.py +0 -0
  151. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/markplayed.py +0 -0
  152. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/markunplayed.py +0 -0
  153. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/performsearch.py +0 -0
  154. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/performvoicesearch.py +0 -0
  155. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/refreshlibrary.py +0 -0
  156. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/searchlibrary.py +0 -0
  157. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/startalltasks.py +0 -0
  158. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/starttask.py +0 -0
  159. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/startuniversaltranscode.py +0 -0
  160. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/stopalltasks.py +0 -0
  161. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/stoptask.py +0 -0
  162. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/stoptranscodesession.py +0 -0
  163. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/updateplaylist.py +0 -0
  164. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/updateplayprogress.py +0 -0
  165. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/models/operations/uploadplaylist.py +0 -0
  166. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api/utils/__init__.py +0 -0
  167. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api_client.egg-info/dependency_links.txt +0 -0
  168. {plex-api-client-0.2.0 → plex-api-client-0.6.0}/src/plex_api_client.egg-info/top_level.txt +0 -0
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plex-api-client
3
- Version: 0.2.0
3
+ Version: 0.6.0
4
4
  Summary: Python Client SDK Generated by Speakeasy
5
- Home-page: UNKNOWN
5
+ Home-page: https://github.com/LukeHagar/plexpy.git
6
6
  Author: LukeHagar
7
7
  License: UNKNOWN
8
8
  Description: # plexpy
@@ -32,6 +32,7 @@ Description: # plexpy
32
32
 
33
33
  s = plex_api.PlexAPI(
34
34
  access_token="<YOUR_API_KEY_HERE>",
35
+ x_plex_client_identifier='<value>',
35
36
  )
36
37
 
37
38
 
@@ -40,6 +41,7 @@ Description: # plexpy
40
41
  if res.object is not None:
41
42
  # handle response
42
43
  pass
44
+
43
45
  ```
44
46
  <!-- End SDK Example Usage [usage] -->
45
47
 
@@ -129,10 +131,10 @@ Description: # plexpy
129
131
  * [add_playlist_contents](docs/sdks/playlists/README.md#add_playlist_contents) - Adding to a Playlist
130
132
  * [upload_playlist](docs/sdks/playlists/README.md#upload_playlist) - Upload Playlist
131
133
 
132
- ### [security](docs/sdks/security/README.md)
134
+ ### [authentication](docs/sdks/authentication/README.md)
133
135
 
134
- * [get_transient_token](docs/sdks/security/README.md#get_transient_token) - Get a Transient Token.
135
- * [get_source_connection_information](docs/sdks/security/README.md#get_source_connection_information) - Get Source Connection Information
136
+ * [get_transient_token](docs/sdks/authentication/README.md#get_transient_token) - Get a Transient Token.
137
+ * [get_source_connection_information](docs/sdks/authentication/README.md#get_source_connection_information) - Get Source Connection Information
136
138
 
137
139
  ### [statistics](docs/sdks/statistics/README.md)
138
140
 
@@ -160,7 +162,7 @@ Description: # plexpy
160
162
  | Error Object | Status Code | Content Type |
161
163
  | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
162
164
  | errors.GetServerCapabilitiesResponseBody | 401 | application/json |
163
- | errors.SDKError | 4x-5xx | */* |
165
+ | errors.SDKError | 4xx-5xx | */* |
164
166
 
165
167
  ### Example
166
168
 
@@ -170,6 +172,7 @@ Description: # plexpy
170
172
 
171
173
  s = plex_api.PlexAPI(
172
174
  access_token="<YOUR_API_KEY_HERE>",
175
+ x_plex_client_identifier='<value>',
173
176
  )
174
177
 
175
178
 
@@ -186,6 +189,7 @@ Description: # plexpy
186
189
  if res.object is not None:
187
190
  # handle response
188
191
  pass
192
+
189
193
  ```
190
194
  <!-- End Error Handling [errors] -->
191
195
 
@@ -208,6 +212,7 @@ Description: # plexpy
208
212
  s = plex_api.PlexAPI(
209
213
  server_idx=0,
210
214
  access_token="<YOUR_API_KEY_HERE>",
215
+ x_plex_client_identifier='<value>',
211
216
  )
212
217
 
213
218
 
@@ -216,6 +221,7 @@ Description: # plexpy
216
221
  if res.object is not None:
217
222
  # handle response
218
223
  pass
224
+
219
225
  ```
220
226
 
221
227
  #### Variables
@@ -234,6 +240,7 @@ Description: # plexpy
234
240
  s = plex_api.PlexAPI(
235
241
  server_url="{protocol}://{ip}:{port}",
236
242
  access_token="<YOUR_API_KEY_HERE>",
243
+ x_plex_client_identifier='<value>',
237
244
  )
238
245
 
239
246
 
@@ -242,6 +249,7 @@ Description: # plexpy
242
249
  if res.object is not None:
243
250
  # handle response
244
251
  pass
252
+
245
253
  ```
246
254
 
247
255
  ### Override Server URL Per-Operation
@@ -251,15 +259,16 @@ Description: # plexpy
251
259
  import plex_api
252
260
 
253
261
  s = plex_api.PlexAPI(
254
- access_token="<YOUR_API_KEY_HERE>",
262
+ x_plex_client_identifier='<value>',
255
263
  )
256
264
 
257
265
 
258
- res = s.plex.get_pin(server_url="https://plex.tv/api/v2", x_plex_client_identifier='<value>', strong=False)
266
+ res = s.plex.get_pin(server_url="https://plex.tv/api/v2", strong=False, x_plex_client_identifier='<value>')
259
267
 
260
268
  if res.object is not None:
261
269
  # handle response
262
270
  pass
271
+
263
272
  ```
264
273
  <!-- End Server Selection [server] -->
265
274
 
@@ -275,7 +284,7 @@ Description: # plexpy
275
284
 
276
285
  http_client = requests.Session()
277
286
  http_client.headers.update({'x-custom-header': 'someValue'})
278
- s = plex_api.PlexAPI(client: http_client)
287
+ s = plex_api.PlexAPI(client=http_client)
279
288
  ```
280
289
  <!-- End Custom HTTP Client [http-client] -->
281
290
 
@@ -296,6 +305,7 @@ Description: # plexpy
296
305
 
297
306
  s = plex_api.PlexAPI(
298
307
  access_token="<YOUR_API_KEY_HERE>",
308
+ x_plex_client_identifier='<value>',
299
309
  )
300
310
 
301
311
 
@@ -304,9 +314,49 @@ Description: # plexpy
304
314
  if res.object is not None:
305
315
  # handle response
306
316
  pass
317
+
307
318
  ```
308
319
  <!-- End Authentication [security] -->
309
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
+
310
360
  <!-- Placeholder for Future Speakeasy SDK Sections -->
311
361
 
312
362
  # Development
@@ -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
 
@@ -122,10 +124,10 @@ if res.object is not None:
122
124
  * [add_playlist_contents](docs/sdks/playlists/README.md#add_playlist_contents) - Adding to a Playlist
123
125
  * [upload_playlist](docs/sdks/playlists/README.md#upload_playlist) - Upload Playlist
124
126
 
125
- ### [security](docs/sdks/security/README.md)
127
+ ### [authentication](docs/sdks/authentication/README.md)
126
128
 
127
- * [get_transient_token](docs/sdks/security/README.md#get_transient_token) - Get a Transient Token.
128
- * [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
129
131
 
130
132
  ### [statistics](docs/sdks/statistics/README.md)
131
133
 
@@ -153,7 +155,7 @@ Handling errors in this SDK should largely match your expectations. All operati
153
155
  | Error Object | Status Code | Content Type |
154
156
  | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
155
157
  | errors.GetServerCapabilitiesResponseBody | 401 | application/json |
156
- | errors.SDKError | 4x-5xx | */* |
158
+ | errors.SDKError | 4xx-5xx | */* |
157
159
 
158
160
  ### Example
159
161
 
@@ -163,6 +165,7 @@ from plex_api.models import errors
163
165
 
164
166
  s = plex_api.PlexAPI(
165
167
  access_token="<YOUR_API_KEY_HERE>",
168
+ x_plex_client_identifier='<value>',
166
169
  )
167
170
 
168
171
 
@@ -179,6 +182,7 @@ except errors.SDKError as e:
179
182
  if res.object is not None:
180
183
  # handle response
181
184
  pass
185
+
182
186
  ```
183
187
  <!-- End Error Handling [errors] -->
184
188
 
@@ -201,6 +205,7 @@ import plex_api
201
205
  s = plex_api.PlexAPI(
202
206
  server_idx=0,
203
207
  access_token="<YOUR_API_KEY_HERE>",
208
+ x_plex_client_identifier='<value>',
204
209
  )
205
210
 
206
211
 
@@ -209,6 +214,7 @@ res = s.server.get_server_capabilities()
209
214
  if res.object is not None:
210
215
  # handle response
211
216
  pass
217
+
212
218
  ```
213
219
 
214
220
  #### Variables
@@ -227,6 +233,7 @@ import plex_api
227
233
  s = plex_api.PlexAPI(
228
234
  server_url="{protocol}://{ip}:{port}",
229
235
  access_token="<YOUR_API_KEY_HERE>",
236
+ x_plex_client_identifier='<value>',
230
237
  )
231
238
 
232
239
 
@@ -235,6 +242,7 @@ res = s.server.get_server_capabilities()
235
242
  if res.object is not None:
236
243
  # handle response
237
244
  pass
245
+
238
246
  ```
239
247
 
240
248
  ### Override Server URL Per-Operation
@@ -244,15 +252,16 @@ The server URL can also be overridden on a per-operation basis, provided a serve
244
252
  import plex_api
245
253
 
246
254
  s = plex_api.PlexAPI(
247
- access_token="<YOUR_API_KEY_HERE>",
255
+ x_plex_client_identifier='<value>',
248
256
  )
249
257
 
250
258
 
251
- res = s.plex.get_pin(server_url="https://plex.tv/api/v2", x_plex_client_identifier='<value>', strong=False)
259
+ res = s.plex.get_pin(server_url="https://plex.tv/api/v2", strong=False, x_plex_client_identifier='<value>')
252
260
 
253
261
  if res.object is not None:
254
262
  # handle response
255
263
  pass
264
+
256
265
  ```
257
266
  <!-- End Server Selection [server] -->
258
267
 
@@ -268,7 +277,7 @@ import requests
268
277
 
269
278
  http_client = requests.Session()
270
279
  http_client.headers.update({'x-custom-header': 'someValue'})
271
- s = plex_api.PlexAPI(client: http_client)
280
+ s = plex_api.PlexAPI(client=http_client)
272
281
  ```
273
282
  <!-- End Custom HTTP Client [http-client] -->
274
283
 
@@ -289,6 +298,7 @@ import plex_api
289
298
 
290
299
  s = plex_api.PlexAPI(
291
300
  access_token="<YOUR_API_KEY_HERE>",
301
+ x_plex_client_identifier='<value>',
292
302
  )
293
303
 
294
304
 
@@ -297,9 +307,49 @@ res = s.server.get_server_capabilities()
297
307
  if res.object is not None:
298
308
  # handle response
299
309
  pass
310
+
300
311
  ```
301
312
  <!-- End Authentication [security] -->
302
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
+
303
353
  <!-- Placeholder for Future Speakeasy SDK Sections -->
304
354
 
305
355
  # Development
@@ -10,18 +10,19 @@ except FileNotFoundError:
10
10
 
11
11
  setuptools.setup(
12
12
  name="plex-api-client",
13
- version="0.2.0",
13
+ version="0.6.0",
14
14
  author="LukeHagar",
15
15
  description="Python Client SDK Generated by Speakeasy",
16
+ url="https://github.com/LukeHagar/plexpy.git",
16
17
  long_description=long_description,
17
18
  long_description_content_type="text/markdown",
18
19
  packages=setuptools.find_packages(where="src"),
19
20
  install_requires=[
20
21
  "certifi>=2023.7.22",
21
22
  "charset-normalizer>=3.2.0",
22
- "dataclasses-json-speakeasy>=0.5.11",
23
+ "dataclasses-json>=0.6.4",
23
24
  "idna>=3.4",
24
- "jsonpath-python>=1.0.6 ",
25
+ "jsonpath-python>=1.0.6",
25
26
  "marshmallow>=3.19.0",
26
27
  "mypy-extensions>=1.0.0",
27
28
  "packaging>=23.1",
@@ -33,7 +34,9 @@ setuptools.setup(
33
34
  "urllib3>=1.26.18",
34
35
  ],
35
36
  extras_require={
36
- "dev":["pylint==2.16.2"]
37
+ "dev": [
38
+ "pylint==2.16.2",
39
+ ],
37
40
  },
38
41
  package_dir={'': 'src'},
39
42
  python_requires='>=3.8',
@@ -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"""
@@ -0,0 +1,57 @@
1
+ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
2
+
3
+ import requests
4
+ from .types import SDKInitHook, BeforeRequestContext, BeforeRequestHook, AfterSuccessContext, AfterSuccessHook, AfterErrorContext, AfterErrorHook, Hooks
5
+ from .registration import init_hooks
6
+ from typing import List, Optional, Tuple
7
+
8
+
9
+ class SDKHooks(Hooks):
10
+ def __init__(self):
11
+ self.sdk_init_hooks: List[SDKInitHook] = []
12
+ self.before_request_hooks: List[BeforeRequestHook] = []
13
+ self.after_success_hooks: List[AfterSuccessHook] = []
14
+ self.after_error_hooks: List[AfterErrorHook] = []
15
+ init_hooks(self)
16
+
17
+ def register_sdk_init_hook(self, hook: SDKInitHook) -> None:
18
+ self.sdk_init_hooks.append(hook)
19
+
20
+ def register_before_request_hook(self, hook: BeforeRequestHook) -> None:
21
+ self.before_request_hooks.append(hook)
22
+
23
+ def register_after_success_hook(self, hook: AfterSuccessHook) -> None:
24
+ self.after_success_hooks.append(hook)
25
+
26
+ def register_after_error_hook(self, hook: AfterErrorHook) -> None:
27
+ self.after_error_hooks.append(hook)
28
+
29
+ def sdk_init(self, base_url: str, client: requests.Session) -> Tuple[str, requests.Session]:
30
+ for hook in self.sdk_init_hooks:
31
+ base_url, client = hook.sdk_init(base_url, client)
32
+ return base_url, client
33
+
34
+ def before_request(self, hook_ctx: BeforeRequestContext, request: requests.PreparedRequest) -> requests.PreparedRequest:
35
+ for hook in self.before_request_hooks:
36
+ out = hook.before_request(hook_ctx, request)
37
+ if isinstance(out, Exception):
38
+ raise out
39
+ request = out
40
+
41
+ return request
42
+
43
+ def after_success(self, hook_ctx: AfterSuccessContext, response: requests.Response) -> requests.Response:
44
+ for hook in self.after_success_hooks:
45
+ out = hook.after_success(hook_ctx, response)
46
+ if isinstance(out, Exception):
47
+ raise out
48
+ response = out
49
+ return response
50
+
51
+ def after_error(self, hook_ctx: AfterErrorContext, response: Optional[requests.Response], error: Optional[Exception]) -> Tuple[Optional[requests.Response], Optional[Exception]]:
52
+ for hook in self.after_error_hooks:
53
+ result = hook.after_error(hook_ctx, response, error)
54
+ if isinstance(result, Exception):
55
+ raise result
56
+ response, error = result
57
+ return response, error
@@ -0,0 +1,74 @@
1
+ """Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
2
+
3
+ import requests as requests_http
4
+ from abc import ABC, abstractmethod
5
+ from typing import Any, Callable, List, Optional, Tuple, Union
6
+
7
+
8
+ class HookContext:
9
+ operation_id: str
10
+ oauth2_scopes: Optional[List[str]] = None
11
+ security_source: Optional[Union[Any, Callable[[], Any]]] = None
12
+
13
+ def __init__(self, operation_id: str, oauth2_scopes: Optional[List[str]], security_source: Optional[Union[Any, Callable[[], Any]]]):
14
+ self.operation_id = operation_id
15
+ self.oauth2_scopes = oauth2_scopes
16
+ self.security_source = security_source
17
+
18
+
19
+ class BeforeRequestContext(HookContext):
20
+ def __init__(self, hook_ctx: HookContext):
21
+ super().__init__(hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source)
22
+
23
+
24
+ class AfterSuccessContext(HookContext):
25
+ def __init__(self, hook_ctx: HookContext):
26
+ super().__init__(hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source)
27
+
28
+
29
+
30
+ class AfterErrorContext(HookContext):
31
+ def __init__(self, hook_ctx: HookContext):
32
+ super().__init__(hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source)
33
+
34
+
35
+ class SDKInitHook(ABC):
36
+ @abstractmethod
37
+ def sdk_init(self, base_url: str, client: requests_http.Session) -> Tuple[str, requests_http.Session]:
38
+ pass
39
+
40
+
41
+ class BeforeRequestHook(ABC):
42
+ @abstractmethod
43
+ def before_request(self, hook_ctx: BeforeRequestContext, request: requests_http.PreparedRequest) -> Union[requests_http.PreparedRequest, Exception]:
44
+ pass
45
+
46
+
47
+ class AfterSuccessHook(ABC):
48
+ @abstractmethod
49
+ def after_success(self, hook_ctx: AfterSuccessContext, response: requests_http.Response) -> Union[requests_http.Response, Exception]:
50
+ pass
51
+
52
+
53
+ class AfterErrorHook(ABC):
54
+ @abstractmethod
55
+ def after_error(self, hook_ctx: AfterErrorContext, response: Optional[requests_http.Response], error: Optional[Exception]) -> Union[Tuple[Optional[requests_http.Response], Optional[Exception]], Exception]:
56
+ pass
57
+
58
+
59
+ class Hooks(ABC):
60
+ @abstractmethod
61
+ def register_sdk_init_hook(self, hook: SDKInitHook):
62
+ pass
63
+
64
+ @abstractmethod
65
+ def register_before_request_hook(self, hook: BeforeRequestHook):
66
+ pass
67
+
68
+ @abstractmethod
69
+ def register_after_success_hook(self, hook: AfterSuccessHook):
70
+ pass
71
+
72
+ @abstractmethod
73
+ def register_after_error_hook(self, hook: AfterErrorHook):
74
+ pass