mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 12:37:46 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06ae97fe29 | ||
|
|
5848325f97 |
@@ -3,10 +3,10 @@ id: dfa99515-01c0-42eb-9be5-ee212fd03eb3
|
|||||||
management:
|
management:
|
||||||
docChecksum: 77bdddd188d0778dc73b7f7906e1677c
|
docChecksum: 77bdddd188d0778dc73b7f7906e1677c
|
||||||
docVersion: 0.0.3
|
docVersion: 0.0.3
|
||||||
speakeasyVersion: 1.558.1
|
speakeasyVersion: 1.598.3
|
||||||
generationVersion: 2.623.4
|
generationVersion: 2.674.3
|
||||||
releaseVersion: 0.23.0
|
releaseVersion: 0.24.1
|
||||||
configChecksum: d22250392b9bf523127b982981e4f99a
|
configChecksum: 572fddd978a14316b2f4d53532d95815
|
||||||
repoURL: https://github.com/LukeHagar/plexgo.git
|
repoURL: https://github.com/LukeHagar/plexgo.git
|
||||||
repoSubDirectory: .
|
repoSubDirectory: .
|
||||||
installationURL: https://github.com/LukeHagar/plexgo
|
installationURL: https://github.com/LukeHagar/plexgo
|
||||||
@@ -15,7 +15,7 @@ features:
|
|||||||
go:
|
go:
|
||||||
additionalDependencies: 0.1.0
|
additionalDependencies: 0.1.0
|
||||||
constsAndDefaults: 0.1.12
|
constsAndDefaults: 0.1.12
|
||||||
core: 3.8.0
|
core: 3.9.3
|
||||||
defaultEnabledRetries: 0.2.0
|
defaultEnabledRetries: 0.2.0
|
||||||
deprecations: 2.81.3
|
deprecations: 2.81.3
|
||||||
downloadStreams: 0.1.2
|
downloadStreams: 0.1.2
|
||||||
@@ -33,9 +33,9 @@ features:
|
|||||||
nullables: 0.1.1
|
nullables: 0.1.1
|
||||||
openEnums: 0.1.0
|
openEnums: 0.1.0
|
||||||
responseFormat: 0.1.2
|
responseFormat: 0.1.2
|
||||||
retries: 2.83.3
|
retries: 2.84.0
|
||||||
sdkHooks: 0.2.0
|
sdkHooks: 0.2.0
|
||||||
unions: 2.85.10
|
unions: 2.85.12
|
||||||
uploadStreams: 0.1.0
|
uploadStreams: 0.1.0
|
||||||
generatedFiles:
|
generatedFiles:
|
||||||
- .gitattributes
|
- .gitattributes
|
||||||
@@ -1297,6 +1297,17 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-update-play-progress:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
key: "<key>"
|
||||||
|
time: 90000
|
||||||
|
state: "played"
|
||||||
|
responses:
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
get-banner-image:
|
get-banner-image:
|
||||||
speakeasy-default-get-banner-image:
|
speakeasy-default-get-banner-image:
|
||||||
parameters:
|
parameters:
|
||||||
@@ -1354,6 +1365,24 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-get-timeline:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
ratingKey: 23409
|
||||||
|
key: "/library/metadata/23409"
|
||||||
|
state: "playing"
|
||||||
|
hasMDE: 1
|
||||||
|
time: 2000
|
||||||
|
duration: 10000
|
||||||
|
context: "home:hub.continueWatching"
|
||||||
|
playQueueItemID: 1
|
||||||
|
playBackTime: 2000
|
||||||
|
row: 1
|
||||||
|
responses:
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
startUniversalTranscode:
|
startUniversalTranscode:
|
||||||
"":
|
"":
|
||||||
parameters:
|
parameters:
|
||||||
@@ -1379,6 +1408,30 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-start-universal-transcode:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
hasMDE: 1
|
||||||
|
path: "/library/metadata/23409"
|
||||||
|
mediaIndex: 0
|
||||||
|
partIndex: 0
|
||||||
|
protocol: "hls"
|
||||||
|
fastSeek: 0
|
||||||
|
directPlay: 0
|
||||||
|
directStream: 0
|
||||||
|
subtitleSize: 100
|
||||||
|
subtites: "burn"
|
||||||
|
audioBoost: 100
|
||||||
|
location: "lan"
|
||||||
|
mediaBufferSize: 102400
|
||||||
|
session: "zvcage8b7rkioqcm8f4uns4c"
|
||||||
|
addDebugOverlay: 0
|
||||||
|
autoAdjustQuality: 0
|
||||||
|
responses:
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
getServerActivities:
|
getServerActivities:
|
||||||
speakeasy-default-get-server-activities:
|
speakeasy-default-get-server-activities:
|
||||||
responses:
|
responses:
|
||||||
@@ -1398,6 +1451,15 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-cancel-server-activities:
|
||||||
|
parameters:
|
||||||
|
path:
|
||||||
|
activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e"
|
||||||
|
responses:
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
getButlerTasks:
|
getButlerTasks:
|
||||||
speakeasy-default-get-butler-tasks:
|
speakeasy-default-get-butler-tasks:
|
||||||
responses:
|
responses:
|
||||||
@@ -1493,6 +1555,21 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-get-server-resources:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
includeHttps: 1
|
||||||
|
includeRelay: 1
|
||||||
|
includeIPv6: 1
|
||||||
|
header:
|
||||||
|
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
application/json: [{"name": "<value>", "product": "Ergonomic Plastic Hat", "productVersion": "<value>", "platform": "<value>", "platformVersion": "<value>", "device": "Mobile", "clientIdentifier": "<value>", "createdAt": "2019-06-24T11:38:02Z", "lastSeenAt": "2019-06-24T11:38:02Z", "provides": "<value>", "ownerId": null, "sourceTitle": "<value>", "publicAddress": "<value>", "accessToken": "<value>", "owned": true, "home": false, "synced": false, "relay": true, "presence": false, "httpsRequired": true, "publicAddressMatches": false, "dnsRebindingProtection": true, "natLoopbackSupported": false, "connections": [{"protocol": "http", "address": "5746 Mount Street", "port": 441996, "uri": "https://wide-kick.name/", "local": false, "relay": true, "IPv6": true}]}]
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
getPin:
|
getPin:
|
||||||
"":
|
"":
|
||||||
parameters:
|
parameters:
|
||||||
@@ -1509,6 +1586,21 @@ examples:
|
|||||||
application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null}
|
application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null}
|
||||||
"400":
|
"400":
|
||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
speakeasy-default-get-pin:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
strong: false
|
||||||
|
header:
|
||||||
|
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||||
|
X-Plex-Product: "Plex for Roku"
|
||||||
|
X-Plex-Device: "Roku 3"
|
||||||
|
X-Plex-Version: "2.4.1"
|
||||||
|
X-Plex-Platform: "Roku"
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null}
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
getTokenByPinId:
|
getTokenByPinId:
|
||||||
"":
|
"":
|
||||||
parameters:
|
parameters:
|
||||||
@@ -1523,6 +1615,23 @@ examples:
|
|||||||
responses:
|
responses:
|
||||||
"404":
|
"404":
|
||||||
application/json: {"errors": [{"code": 1020, "message": "Code not found or expired"}]}
|
application/json: {"errors": [{"code": 1020, "message": "Code not found or expired"}]}
|
||||||
|
speakeasy-default-get-token-by-pin-id:
|
||||||
|
parameters:
|
||||||
|
path:
|
||||||
|
pinID: 232248
|
||||||
|
header:
|
||||||
|
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||||
|
X-Plex-Product: "Plex for Roku"
|
||||||
|
X-Plex-Device: "Roku 3"
|
||||||
|
X-Plex-Version: "2.4.1"
|
||||||
|
X-Plex-Platform: "Roku"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
application/json: {"id": 308667304, "code": "7RQZ", "product": "0", "trusted": false, "qr": "https://plex.tv/api/v2/pins/qr/7RQZ", "clientIdentifier": "string", "location": {"code": "VI", "continent_code": "NA", "country": "United States Virgin Islands", "city": "Amsterdam", "european_union_member": true, "time_zone": "America/St_Thomas", "postal_code": "802", "in_privacy_restricted_country": true, "in_privacy_restricted_region": true, "subdivisions": "Saint Thomas", "coordinates": "18.3381, -64.8941"}, "expiresIn": 876, "createdAt": "2024-07-16T17:03:05Z", "expiresAt": "2024-07-16T17:18:05Z", "authToken": null, "newRegistration": null}
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"404":
|
||||||
|
application/json: {"errors": [{"code": 1020, "message": "Code not found or expired"}]}
|
||||||
getGlobalHubs:
|
getGlobalHubs:
|
||||||
speakeasy-default-get-global-hubs:
|
speakeasy-default-get-global-hubs:
|
||||||
responses:
|
responses:
|
||||||
@@ -1777,6 +1886,22 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-get-search-all-libraries:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
query: "<value>"
|
||||||
|
searchTypes: ["people"]
|
||||||
|
includeCollections: 1
|
||||||
|
includeExternalMedia: 1
|
||||||
|
header:
|
||||||
|
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
application/json: {"MediaContainer": {"size": 50, "allowSync": false, "identifier": "com.plexapp.plugins.library", "librarySectionID": 2, "librarySectionTitle": "TV Series", "librarySectionUUID": "e69655a2-ef48-4aba-bb19-0cc34d1e7d36", "mediaTagPrefix": "/system/bundle/media/flags/", "mediaTagVersion": 1734362201, "SearchResult": [{"score": 0.92, "Directory": {"key": "/library/sections/3/all?actor=197429", "librarySectionID": 1, "librarySectionKey": "/library/sections/1", "librarySectionTitle": "Movies", "librarySectionType": 1, "type": "tag", "id": 197429, "filter": "actor=197429", "tag": "Ben Stiller", "tagType": 4, "tagKey": "5d776826999c64001ec2c606", "thumb": "https://metadata-static.plex.tv/5/people/57bd7c7d6c5c9e2881251b30e5603d3d.jpg", "count": 10}, "Metadata": {"ratingKey": "58683", "key": "/library/metadata/58683", "guid": "plex://movie/5d7768ba96b655001fdc0408", "slug": "4-for-texas", "studio": "20th Century Studios", "type": "movie", "title": "Avatar: The Way of Water", "banner": "/library/metadata/58683/banner/1703239236", "titleSort": "Whale", "contentRating": "PG-13", "summary": "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora.\nOnce a familiar threat returns to finish what was previously started, Jake must\nwork with Neytiri and the army of the Na'vi race to protect their home.\n", "rating": 7.6, "audienceRating": 9.2, "year": 2022, "tagline": "Return to Pandora.", "thumb": "/library/metadata/58683/thumb/1703239236", "art": "/library/metadata/58683/art/1703239236", "theme": "/library/metadata/1/theme/1705636920", "index": 1, "leafCount": 14, "viewedLeafCount": 0, "childCount": 1, "seasonCount": 2022, "duration": 11558112, "originallyAvailableAt": "2022-12-14", "addedAt": 1556281940, "updatedAt": 1556281940, "parentYear": 2010, "audienceRatingImage": "rottentomatoes://image.rating.upright", "chapterSource": "media", "primaryExtraKey": "/library/metadata/58684", "originalTitle": "映画 ブラッククローバー 魔法帝の剣", "parentRatingKey": "66", "grandparentRatingKey": "66", "parentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentGuid": "plex://show/5d9c081b170e24001f2a7be4", "grandparentSlug": "alice-in-borderland-2020", "grandparentKey": "/library/metadata/66", "parentKey": "/library/metadata/66", "grandparentTitle": "Caprica", "grandparentThumb": "/library/metadata/66/thumb/1705716261", "grandparentTheme": "/library/metadata/66/theme/1705716261", "grandparentArt": "/library/metadata/66/art/1705716261", "parentTitle": "Caprica", "parentIndex": 1, "parentThumb": "/library/metadata/66/thumb/1705716261", "ratingImage": "rottentomatoes://image.rating.ripe", "viewCount": 1, "viewOffset": 5222500, "skipCount": 1, "subtype": "clip", "lastRatedAt": 1721813113, "createdAtAccuracy": "epoch,local", "createdAtTZOffset": "0", "lastViewedAt": 1682752242, "userRating": 10, "Image": [{"alt": "Episode 1", "type": "background", "url": "/library/metadata/45521/thumb/1644710589"}], "UltraBlurColors": {"topLeft": "11333b", "topRight": "0a232d", "bottomRight": "73958", "bottomLeft": "1f5066"}, "Guid": [{"id": "{\"imdbExample\":{\"summary\":\"IMDB example\",\"value\":\"imdb://tt13015952\"},\"tmdbExample\":{\"summary\":\"TMDB example\",\"value\":\"tmdb://2434012\"},\"tvdbExample\":{\"summary\":\"TVDB example\",\"value\":\"tvdb://7945991\"}}"}], "librarySectionID": 1, "librarySectionTitle": "Movies", "librarySectionKey": "/library/sections/1", "showOrdering": "absolute", "flattenSeasons": "1", "skipChildren": false, "Media": [{"id": 387322, "duration": 9610350, "bitrate": 25512, "width": 3840, "height": 1602, "aspectRatio": 2.35, "audioChannels": 6, "displayOffset": 50, "audioCodec": "aac", "videoCodec": "hevc", "videoResolution": "4k", "container": "mp4", "videoFrameRate": "24p", "videoProfile": "main 10", "hasVoiceActivity": false, "audioProfile": "dts", "has64bitOffsets": false, "Part": [{"accessible": true, "exists": true, "id": 418385, "key": "/library/parts/418385/1735864239/file.mkv", "indexes": "sd", "duration": 9610350, "file": "/mnt/Movies_1/W/Wicked (2024).mkv", "size": 30649952104, "packetLength": 188, "container": "mkv", "videoProfile": "main 10", "audioProfile": "dts", "has64bitOffsets": false, "hasThumbnail": "1"}]}], "Genre": [{"id": 259, "tag": "Crime"}], "Country": [{"id": 259, "tag": "United States of America"}], "Director": [{"id": 126522, "tag": "Danny Boyle", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}], "Writer": [{"id": 126522, "tag": "Jamie P. Hanson", "thumb": "https://metadata-static.plex.tv/8/people/8d65fa96804802e08f2de09fe014408e.jpg"}], "Role": [{"id": 126522, "tag": "Teller", "role": "Self - Judge", "thumb": "https://metadata-static.plex.tv/7/people/708568fd018d7aa8b1032dcf867747e8.jpg"}], "Location": [{"path": "/TV Shows/Clarkson's Farm"}]}}]}}
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
get-media-meta-data:
|
get-media-meta-data:
|
||||||
speakeasy-default-get-media-meta-data:
|
speakeasy-default-get-media-meta-data:
|
||||||
parameters:
|
parameters:
|
||||||
@@ -2086,6 +2211,23 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-post-users-sign-in-data:
|
||||||
|
parameters:
|
||||||
|
header:
|
||||||
|
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||||
|
X-Plex-Product: "Plex for Roku"
|
||||||
|
X-Plex-Device: "Roku 3"
|
||||||
|
X-Plex-Version: "2.4.1"
|
||||||
|
X-Plex-Platform: "Roku"
|
||||||
|
requestBody:
|
||||||
|
application/x-www-form-urlencoded: {"login": "username@email.com", "password": "password123", "rememberMe": false, "verificationCode": "123456"}
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
application/json: {"adsConsent": null, "adsConsentReminderAt": 1556281940, "adsConsentSetAt": 1556281940, "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": ["[]"], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1556281940, "locale": "ru", "mailingListActive": false, "mailingListStatus": "active", "maxHomeSize": 15, "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": 1, "defaultSubtitleAccessibility": 1, "defaultSubtitleForced": 1, "watchedIndicator": 1, "mediaReviewsVisibility": 1}, "protected": false, "rememberExpiresAt": 1556281940, "restricted": false, "scrobbleTypes": "<value>", "services": [], "subscription": {"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}, "subscriptionDescription": "<value>", "subscriptions": [{"active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f", "attributionPartner": null, "pastSubscriptions": [], "trials": []}
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
getStatistics:
|
getStatistics:
|
||||||
"":
|
"":
|
||||||
parameters:
|
parameters:
|
||||||
@@ -2098,6 +2240,17 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-get-statistics:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
timespan: 4
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
application/json: {"MediaContainer": {"size": 5497, "Device": [{"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}], "Account": [{"id": 238960586, "key": "/accounts/238960586", "name": "Diane", "defaultAudioLanguage": "en", "autoSelectAudio": true, "defaultSubtitleLanguage": "en", "subtitleMode": 1, "thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}], "StatisticsMedia": [{"accountID": 1, "deviceID": 13, "timespan": 4, "at": 1707141600, "metadataType": 4, "count": 1, "duration": 1555}]}}
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
getResourcesStatistics:
|
getResourcesStatistics:
|
||||||
"":
|
"":
|
||||||
parameters:
|
parameters:
|
||||||
@@ -2110,6 +2263,17 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-get-resources-statistics:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
timespan: 4
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
application/json: {"MediaContainer": {"size": 5497, "StatisticsResources": [{"timespan": 6, "at": 1718384427, "hostCpuUtilization": 1.276, "processCpuUtilization": 0.025, "hostMemoryUtilization": 17.026, "processMemoryUtilization": 0.493}]}}
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
getBandwidthStatistics:
|
getBandwidthStatistics:
|
||||||
"":
|
"":
|
||||||
parameters:
|
parameters:
|
||||||
@@ -2122,6 +2286,17 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-get-bandwidth-statistics:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
timespan: 4
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
application/json: {"MediaContainer": {"size": 5497, "Device": [{"id": 208, "name": "Roku Express", "platform": "Roku", "clientIdentifier": "793095d235660625108ef785cc7646e9", "createdAt": 1706470556}], "Account": [{"id": 238960586, "key": "/accounts/238960586", "name": "Diane", "defaultAudioLanguage": "en", "autoSelectAudio": true, "defaultSubtitleLanguage": "en", "subtitleMode": 1, "thumb": "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967"}], "StatisticsBandwidth": [{"accountID": 238960586, "deviceID": 208, "timespan": 6, "at": 1718387650, "lan": true, "bytes": 22}]}}
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
getSessions:
|
getSessions:
|
||||||
speakeasy-default-get-sessions:
|
speakeasy-default-get-sessions:
|
||||||
responses:
|
responses:
|
||||||
@@ -2214,6 +2389,19 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-get-session-history:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
accountId: 1
|
||||||
|
filter: {}
|
||||||
|
librarySectionID: 12
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
application/json: {"MediaContainer": {"size": 10855, "Metadata": [{"historyKey": "/status/sessions/history/1", "key": "/library/metadata/32171", "ratingKey": "32171", "librarySectionID": "2", "parentKey": "/library/metadata/32170", "grandparentKey": "/library/metadata/32132", "title": "The Noise That Blue Makes", "grandparentTitle": "Taskmaster", "type": "episode", "thumb": "/library/metadata/32171/thumb/-1", "parentThumb": "/library/metadata/32170/thumb/1654134301", "grandparentThumb": "/library/metadata/32132/thumb/1703933346", "grandparentArt": "/library/metadata/32132/art/1703933346", "index": 1, "parentIndex": 13, "originallyAvailableAt": "2022-04-14T00:00:00Z", "viewedAt": 1654139223, "accountID": 1, "deviceID": 5}]}}
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
getTranscodeSessions:
|
getTranscodeSessions:
|
||||||
speakeasy-default-get-transcode-sessions:
|
speakeasy-default-get-transcode-sessions:
|
||||||
responses:
|
responses:
|
||||||
@@ -2252,6 +2440,15 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-check-for-updates:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
download: 1
|
||||||
|
responses:
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
applyUpdates:
|
applyUpdates:
|
||||||
"":
|
"":
|
||||||
parameters:
|
parameters:
|
||||||
@@ -2263,6 +2460,16 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-apply-updates:
|
||||||
|
parameters:
|
||||||
|
query:
|
||||||
|
tonight: 1
|
||||||
|
skip: 1
|
||||||
|
responses:
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
get-users:
|
get-users:
|
||||||
"":
|
"":
|
||||||
parameters:
|
parameters:
|
||||||
@@ -2287,5 +2494,28 @@ examples:
|
|||||||
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
"401":
|
"401":
|
||||||
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
|
speakeasy-default-get-users:
|
||||||
|
parameters:
|
||||||
|
header:
|
||||||
|
X-Plex-Client-Identifier: "3381b62b-9ab7-4e37-827b-203e9809eb58"
|
||||||
|
X-Plex-Product: "Plex for Roku"
|
||||||
|
X-Plex-Device: "Roku 3"
|
||||||
|
X-Plex-Device-Name: "Chrome"
|
||||||
|
X-Plex-Device-Screen-Resolution: "1487x1165,2560x1440"
|
||||||
|
X-Plex-Version: "2.4.1"
|
||||||
|
X-Plex-Platform: "Roku"
|
||||||
|
X-Plex-Features: "external-media,indirect-media,hub-style-list"
|
||||||
|
X-Plex-Model: "4200X"
|
||||||
|
X-Plex-Session-Id: "97e136ef-4ddd-4ff3-89a7-a5820c96c2ca"
|
||||||
|
X-Plex-Language: "en"
|
||||||
|
X-Plex-Platform-Version: "4.3 build 1057"
|
||||||
|
X-Plex-Token: "CV5xoxjTpFKUzBTShsaf"
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
application/xml: "0xfD5052DbD1"
|
||||||
|
"400":
|
||||||
|
application/json: {"errors": [{"code": 1000, "message": "X-Plex-Client-Identifier is missing", "status": 400}]}
|
||||||
|
"401":
|
||||||
|
application/json: {"errors": [{"code": 1001, "message": "User could not be authenticated", "status": 401}]}
|
||||||
examplesVersion: 1.0.2
|
examplesVersion: 1.0.2
|
||||||
generatedTests: {}
|
generatedTests: {}
|
||||||
|
|||||||
@@ -16,8 +16,12 @@ generation:
|
|||||||
auth:
|
auth:
|
||||||
oAuth2ClientCredentialsEnabled: true
|
oAuth2ClientCredentialsEnabled: true
|
||||||
oAuth2PasswordEnabled: false
|
oAuth2PasswordEnabled: false
|
||||||
|
tests:
|
||||||
|
generateTests: true
|
||||||
|
generateNewTests: false
|
||||||
|
skipResponseBodyAssertions: false
|
||||||
go:
|
go:
|
||||||
version: 0.23.0
|
version: 0.24.1
|
||||||
additionalDependencies: {}
|
additionalDependencies: {}
|
||||||
allowUnknownFieldsInWeakUnions: false
|
allowUnknownFieldsInWeakUnions: false
|
||||||
baseErrorName: PlexAPIError
|
baseErrorName: PlexAPIError
|
||||||
@@ -35,6 +39,8 @@ go:
|
|||||||
inputModelSuffix: input
|
inputModelSuffix: input
|
||||||
maxMethodParams: 4
|
maxMethodParams: 4
|
||||||
methodArguments: require-security-and-request
|
methodArguments: require-security-and-request
|
||||||
|
modulePath: ""
|
||||||
outputModelSuffix: output
|
outputModelSuffix: output
|
||||||
packageName: github.com/LukeHagar/plexgo
|
packageName: github.com/LukeHagar/plexgo
|
||||||
responseFormat: envelope
|
responseFormat: envelope
|
||||||
|
sdkPackageName: ""
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
speakeasyVersion: 1.558.1
|
speakeasyVersion: 1.598.3
|
||||||
sources:
|
sources:
|
||||||
my-source:
|
my-source:
|
||||||
sourceNamespace: my-source
|
sourceNamespace: my-source
|
||||||
@@ -9,19 +9,19 @@ sources:
|
|||||||
- main
|
- main
|
||||||
plexapi:
|
plexapi:
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:dafcc1192236829b85bc924e0462432c0eb7318a17c542f46e3dd05a9a6265df
|
sourceRevisionDigest: sha256:b4fa89a3571fbdcb4228800772a5fe1c292170babcd3e055161ae54402f89577
|
||||||
sourceBlobDigest: sha256:bc072115d585e1695cb8393db901a3d36be1dcd57a69bad2b91a1ba7ac3c9c4b
|
sourceBlobDigest: sha256:f84dd2bfdaea4074454cea3c7fbc6c9e05515c5e9e961abb4923b77f8faf48f1
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- speakeasy-sdk-regen-1749514263
|
- speakeasy-sdk-regen-1754525524
|
||||||
targets:
|
targets:
|
||||||
plexgo:
|
plexgo:
|
||||||
source: plexapi
|
source: plexapi
|
||||||
sourceNamespace: plexapi
|
sourceNamespace: plexapi
|
||||||
sourceRevisionDigest: sha256:dafcc1192236829b85bc924e0462432c0eb7318a17c542f46e3dd05a9a6265df
|
sourceRevisionDigest: sha256:b4fa89a3571fbdcb4228800772a5fe1c292170babcd3e055161ae54402f89577
|
||||||
sourceBlobDigest: sha256:bc072115d585e1695cb8393db901a3d36be1dcd57a69bad2b91a1ba7ac3c9c4b
|
sourceBlobDigest: sha256:f84dd2bfdaea4074454cea3c7fbc6c9e05515c5e9e961abb4923b77f8faf48f1
|
||||||
codeSamplesNamespace: code-samples-go-plexgo
|
codeSamplesNamespace: code-samples-go-plexgo
|
||||||
codeSamplesRevisionDigest: sha256:3b03148d4d6862182c93ca6cb369128309b007a961711d86509a555a2c5d813d
|
codeSamplesRevisionDigest: sha256:b3b33cad9d51c5c7b91f0fb005d52d487405e8a7a6e60663cec67546202aac78
|
||||||
workflow:
|
workflow:
|
||||||
workflowVersion: 1.0.0
|
workflowVersion: 1.0.0
|
||||||
speakeasyVersion: latest
|
speakeasyVersion: latest
|
||||||
|
|||||||
@@ -519,12 +519,13 @@ The built-in `net/http` client satisfies this interface and a default client bas
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
"github.com/myorg/your-go-sdk"
|
|
||||||
|
"github.com/LukeHagar/plexgo"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
httpClient = &http.Client{Timeout: 30 * time.Second}
|
httpClient = &http.Client{Timeout: 30 * time.Second}
|
||||||
sdkClient = sdk.New(sdk.WithClient(httpClient))
|
sdkClient = plexgo.New(plexgo.WithClient(httpClient))
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
22
RELEASES.md
22
RELEASES.md
@@ -1172,4 +1172,24 @@ Based on:
|
|||||||
### Generated
|
### Generated
|
||||||
- [go v0.23.0] .
|
- [go v0.23.0] .
|
||||||
### Releases
|
### Releases
|
||||||
- [Go v0.23.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.23.0 - .
|
- [Go v0.23.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.23.0 - .
|
||||||
|
|
||||||
|
## 2025-08-06 00:11:40
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.598.0 (2.674.1) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.24.0] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.24.0] https://github.com/LukeHagar/plexgo/releases/tag/v0.24.0 - .
|
||||||
|
|
||||||
|
## 2025-08-07 00:11:47
|
||||||
|
### Changes
|
||||||
|
Based on:
|
||||||
|
- OpenAPI Doc
|
||||||
|
- Speakeasy CLI 1.598.3 (2.674.3) https://github.com/speakeasy-api/speakeasy
|
||||||
|
### Generated
|
||||||
|
- [go v0.24.1] .
|
||||||
|
### Releases
|
||||||
|
- [Go v0.24.1] https://github.com/LukeHagar/plexgo/releases/tag/v0.24.1 - .
|
||||||
@@ -795,7 +795,7 @@ actions:
|
|||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Library.GetFileHash(ctx, "file://C:\Image.png&type=13", nil)
|
res, err := s.Library.GetFileHash(ctx, "file://C:\\Image.png&type=13", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ Get Server Activities
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getServerActivities" method="get" path="/activities" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -74,6 +75,7 @@ Cancel Server Activities
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="cancelServerActivities" method="delete" path="/activities/{activityUUID}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ This endpoint provides the caller with a temporary token with the same access le
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getTransientToken" method="get" path="/security/token" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -76,6 +77,7 @@ Note: requires Plex Media Server >= 1.15.4.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getSourceConnectionInformation" method="get" path="/security/resources" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -128,6 +130,7 @@ Get the User data from the provided X-Plex-Token
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getTokenDetails" method="get" path="/user" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -179,6 +182,7 @@ Sign in user with username and password and return user data with Plex authentic
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="post-users-sign-in-data" method="post" path="/users/signin" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ Returns a list of butler tasks
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getButlerTasks" method="get" path="/butler" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -76,6 +77,7 @@ This endpoint will attempt to start all Butler tasks that are enabled in the set
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="startAllTasks" method="post" path="/butler" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -128,6 +130,7 @@ This endpoint will stop all currently running tasks and remove any scheduled tas
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="stopAllTasks" method="delete" path="/butler" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -184,6 +187,7 @@ This endpoint will attempt to start a single Butler task that is enabled in the
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="startTask" method="post" path="/butler/{taskName}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -238,6 +242,7 @@ This endpoint will stop a currently running task by name, or remove it from the
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="stopTask" method="delete" path="/butler/{taskName}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ Get Global Hubs filtered by the parameters provided.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getGlobalHubs" method="get" path="/hubs" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -72,6 +73,7 @@ This endpoint will return the recently added content.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-recently-added" method="get" path="/hubs/home/recentlyAdded" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -129,6 +131,7 @@ This endpoint will return a list of library specific hubs
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getLibraryHubs" method="get" path="/hubs/sections/{sectionId}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ This resource returns hash values for local files
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getFileHash" method="get" path="/library/hashes" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -51,7 +52,7 @@ func main() {
|
|||||||
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
plexgo.WithSecurity("<YOUR_API_KEY_HERE>"),
|
||||||
)
|
)
|
||||||
|
|
||||||
res, err := s.Library.GetFileHash(ctx, "file://C:\Image.png&type=13", nil)
|
res, err := s.Library.GetFileHash(ctx, "file://C:\\Image.png&type=13", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -89,6 +90,7 @@ This endpoint will return the recently added content.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-recently-added-library" method="get" path="/library/recentlyAdded" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -167,6 +169,7 @@ This allows a client to provide a rich interface around the media (e.g. allow so
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-all-libraries" method="get" path="/library/sections" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -257,6 +260,7 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-library-details" method="get" path="/library/sections/{sectionKey}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -311,6 +315,7 @@ Delete a library using a specific section id
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="deleteLibrary" method="delete" path="/library/sections/{sectionKey}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -384,6 +389,7 @@ Fetches details from a specific section of the library identified by a section k
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-library-items" method="get" path="/library/sections/{sectionKey}/{tag}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -444,6 +450,7 @@ Retrieves a list of all general media data for this library.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-library-sections-all" method="get" path="/library/sections/{sectionKey}/all" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -506,6 +513,7 @@ This endpoint Refreshes all the Metadata of the library.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-refresh-library-metadata" method="get" path="/library/sections/{sectionKey}/refresh" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -578,6 +586,7 @@ Each type in the library comes with a set of filters and sorts, aiding in buildi
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-search-library" method="get" path="/library/sections/{sectionKey}/search" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -633,6 +642,7 @@ Retrieves a list of all the genres that are found for the media in this library.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-genres-library" method="get" path="/library/sections/{sectionKey}/genre" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -688,6 +698,7 @@ Retrieves a list of all the countries that are found for the media in this libra
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-countries-library" method="get" path="/library/sections/{sectionKey}/country" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -743,6 +754,7 @@ Retrieves a list of all the actors that are found for the media in this library.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-actors-library" method="get" path="/library/sections/{sectionKey}/actor" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -798,6 +810,7 @@ Search the provided query across all library sections, or a single section, and
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-search-all-libraries" method="get" path="/library/search" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -861,6 +874,7 @@ Multiple rating keys can be provided as a comma-separated list (e.g., "21119,216
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-media-meta-data" method="get" path="/library/metadata/{ratingKey}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -929,6 +943,7 @@ Returns the background artwork for a library item.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-media-arts" method="get" path="/library/metadata/{ratingKey}/arts" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -979,6 +994,7 @@ Uploads an image to use as the background artwork for a library item, either fro
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="post-media-arts" method="post" path="/library/metadata/{ratingKey}/arts" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1031,6 +1047,7 @@ Returns the available posters for a library item.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-media-posters" method="get" path="/library/metadata/{ratingKey}/posters" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1081,6 +1098,7 @@ Uploads a poster to a library item, either from a local file or a remote URL
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="post-media-poster" method="post" path="/library/metadata/{ratingKey}/posters" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1134,6 +1152,7 @@ This endpoint will return the children of of a library item specified with the r
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getMetadataChildren" method="get" path="/library/metadata/{ratingKey}/children" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -1188,6 +1207,7 @@ This endpoint will return the top watched content from libraries of a certain ty
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getTopWatchedContent" method="get" path="/library/all/top" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ This endpoint will write a single-line log message, including a level and source
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="logLine" method="get" path="/log" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -95,6 +96,7 @@ Ensure each parameter is properly URL-encoded to avoid interpretation issues.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="logMultiLine" method="post" path="/log" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -150,6 +152,7 @@ This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="enablePaperTrail" method="get" path="/log/networked" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ This will mark the provided media key as Played.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="markPlayed" method="get" path="/:/scrobble" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -72,6 +73,7 @@ This will mark the provided media key as Unplayed.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="markUnplayed" method="get" path="/:/unscrobble" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -125,6 +127,7 @@ This API command can be used to update the play progress of a media item.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="updatePlayProgress" method="post" path="/:/progress" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -179,6 +182,7 @@ Gets the banner image of the media item
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-banner-image" method="get" path="/library/metadata/{ratingKey}/banner" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -239,6 +243,7 @@ Gets the thumbnail image of the media item
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-thumb-image" method="get" path="/library/metadata/{ratingKey}/thumb" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ Create a new playlist. By default the playlist is blank. To create a playlist al
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="createPlaylist" method="post" path="/playlists" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -88,6 +89,7 @@ Get All Playlists given the specified filters.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getPlaylists" method="get" path="/playlists" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -143,6 +145,7 @@ Smart playlist details contain the `content` attribute. This is the content URI
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getPlaylist" method="get" path="/playlists/{playlistID}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -196,6 +199,7 @@ This endpoint will delete a playlist
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="deletePlaylist" method="delete" path="/playlists/{playlistID}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -249,6 +253,7 @@ From PMS version 1.9.1 clients can also edit playlist metadata using this endpoi
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="updatePlaylist" method="put" path="/playlists/{playlistID}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -307,6 +312,7 @@ Note that for dumb playlists, items have a `playlistItemID` attribute which is u
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getPlaylistContents" method="get" path="/playlists/{playlistID}/items" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -362,6 +368,7 @@ Clears a playlist, only works with dumb playlists. Returns the playlist.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="clearPlaylistContents" method="delete" path="/playlists/{playlistID}/items" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -416,6 +423,7 @@ With a smart playlist, passing a new `uri` parameter replaces the rules for the
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="addPlaylistContents" method="put" path="/playlists/{playlistID}/items" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -471,6 +479,7 @@ Imports m3u playlists by passing a path on the server to scan for m3u-formatted
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="uploadPlaylist" method="post" path="/playlists/upload" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ Get Companions Data
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getCompanionsData" method="get" path="/companions" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -73,6 +74,7 @@ Get friends of provided auth token.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getUserFriends" method="get" path="/friends" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -124,6 +126,7 @@ Returns the geolocation and locale data of the caller
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getGeoData" method="get" path="/geoip" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -173,6 +176,7 @@ Retrieves the home data for the authenticated user, including details like home
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getHomeData" method="get" path="/home" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -224,6 +228,7 @@ Get Plex server access tokens and server connections
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-server-resources" method="get" path="/resources" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -280,6 +285,7 @@ Retrieve a Pin ID from Plex.tv to use for authentication flows
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getPin" method="post" path="/pins" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -336,6 +342,7 @@ Retrieve an Access Token from Plex.tv after the Pin has been authenticated
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getTokenByPinId" method="get" path="/pins/{pinID}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ This request is intended to be very fast, and called as the user types.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="performSearch" method="get" path="/hubs/search" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -88,6 +89,7 @@ Results, as well as their containing per-type hubs, contain a `distance` attribu
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="performVoiceSearch" method="get" path="/hubs/search/voice" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -142,6 +144,7 @@ This will search the database for the string provided.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getSearchResults" method="get" path="/search" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ Get Server Capabilities
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getServerCapabilities" method="get" path="/" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -75,6 +76,7 @@ Get Server Preferences
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getServerPreferences" method="get" path="/:/prefs" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -126,6 +128,7 @@ Get Available Clients
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getAvailableClients" method="get" path="/clients" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -177,6 +180,7 @@ Get Devices
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getDevices" method="get" path="/devices" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -228,6 +232,7 @@ This request is useful to determine if the server is online or offline
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-server-identity" method="get" path="/identity" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -276,6 +281,7 @@ Returns MyPlex Account Information
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getMyPlexAccount" method="get" path="/myplex/account" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -328,6 +334,7 @@ Plex's Photo transcoder is used throughout the service to serve images at specif
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getResizedPhoto" method="get" path="/photo/:/transcode" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -388,6 +395,7 @@ Retrieves media providers and their features from the Plex server.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-media-providers" method="get" path="/media/providers" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -440,6 +448,7 @@ Get Server List
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getServerList" method="get" path="/servers" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ This will retrieve the "Now Playing" Information of the PMS.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getSessions" method="get" path="/status/sessions" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -70,6 +71,7 @@ This will Retrieve a listing of all history views.
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getSessionHistory" method="get" path="/status/sessions/history/all" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -126,6 +128,7 @@ Get Transcode Sessions
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getTranscodeSessions" method="get" path="/transcode/sessions" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -177,6 +180,7 @@ Stop a Transcode Session
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="stopTranscodeSession" method="delete" path="/transcode/sessions/{sessionKey}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ This will return the media statistics for the server
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getStatistics" method="get" path="/statistics/media" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -70,6 +71,7 @@ This will return the resources for the server
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getResourcesStatistics" method="get" path="/statistics/resources" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -122,6 +124,7 @@ This will return the bandwidth statistics for the server
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getBandwidthStatistics" method="get" path="/statistics/bandwidth" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ Querying status of updates
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getUpdateStatus" method="get" path="/updater/status" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -70,6 +71,7 @@ Checking for updates
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="checkForUpdates" method="put" path="/updater/check" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -124,6 +126,7 @@ Note that these two parameters are effectively mutually exclusive. The `tonight`
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="applyUpdates" method="put" path="/updater/apply" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ Get list of all users that are friends and have library access with the provided
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-users" method="get" path="/users" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ Get the timeline for a media item
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="getTimeline" method="get" path="/:/timeline" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
@@ -81,6 +82,7 @@ Begin a Universal Transcode Session
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="startUniversalTranscode" method="get" path="/video/:/transcode/universal/start.mpd" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Get User Watchlist
|
|||||||
|
|
||||||
### Example Usage
|
### Example Usage
|
||||||
|
|
||||||
|
<!-- UsageSnippet language="go" operationID="get-watch-list" method="get" path="/library/sections/watchlist/{filter}" -->
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,11 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"mime"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
|
"net/textproto"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
"regexp"
|
"regexp"
|
||||||
)
|
)
|
||||||
@@ -166,9 +169,21 @@ func encodeMultipartFormData(w io.Writer, data interface{}) (string, error) {
|
|||||||
|
|
||||||
tag := parseMultipartFormTag(field)
|
tag := parseMultipartFormTag(field)
|
||||||
if tag.File {
|
if tag.File {
|
||||||
if err := encodeMultipartFormDataFile(writer, tag.Name, fieldType, valType); err != nil {
|
switch fieldType.Kind() {
|
||||||
writer.Close()
|
case reflect.Slice, reflect.Array:
|
||||||
return "", err
|
for i := 0; i < valType.Len(); i++ {
|
||||||
|
arrayVal := valType.Index(i)
|
||||||
|
|
||||||
|
if err := encodeMultipartFormDataFile(writer, tag.Name+"[]", arrayVal.Type(), arrayVal); err != nil {
|
||||||
|
writer.Close()
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
if err := encodeMultipartFormDataFile(writer, tag.Name, fieldType, valType); err != nil {
|
||||||
|
writer.Close()
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if tag.JSON {
|
} else if tag.JSON {
|
||||||
jw, err := writer.CreateFormField(tag.Name)
|
jw, err := writer.CreateFormField(tag.Name)
|
||||||
@@ -243,7 +258,18 @@ func encodeMultipartFormDataFile(w *multipart.Writer, fieldName string, fieldTyp
|
|||||||
return fmt.Errorf("invalid multipart/form-data file")
|
return fmt.Errorf("invalid multipart/form-data file")
|
||||||
}
|
}
|
||||||
|
|
||||||
fw, err := w.CreateFormFile(fieldName, fileName)
|
// Detect content type based on file extension
|
||||||
|
contentType := mime.TypeByExtension(filepath.Ext(fileName))
|
||||||
|
if contentType == "" {
|
||||||
|
contentType = "application/octet-stream"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create multipart header with proper content type
|
||||||
|
h := make(textproto.MIMEHeader)
|
||||||
|
h.Set("Content-Disposition", fmt.Sprintf(`form-data; name="%s"; filename="%s"`, fieldName, fileName))
|
||||||
|
h.Set("Content-Type", contentType)
|
||||||
|
|
||||||
|
fw, err := w.CreatePart(h)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -251,6 +277,11 @@ func encodeMultipartFormDataFile(w *multipart.Writer, fieldName string, fieldTyp
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset seek position to 0 if the reader supports seeking
|
||||||
|
if seeker, ok := reader.(io.Seeker); ok {
|
||||||
|
_, _ = seeker.Seek(0, io.SeekStart)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
package plexgo
|
package plexgo
|
||||||
|
|
||||||
// Generated from OpenAPI doc version 0.0.3 and generator version 2.623.4
|
// Generated from OpenAPI doc version 0.0.3 and generator version 2.674.3
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -277,9 +277,9 @@ func WithTimeout(timeout time.Duration) SDKOption {
|
|||||||
// New creates a new instance of the SDK with the provided options
|
// New creates a new instance of the SDK with the provided options
|
||||||
func New(opts ...SDKOption) *PlexAPI {
|
func New(opts ...SDKOption) *PlexAPI {
|
||||||
sdk := &PlexAPI{
|
sdk := &PlexAPI{
|
||||||
SDKVersion: "0.23.0",
|
SDKVersion: "0.24.1",
|
||||||
sdkConfiguration: config.SDKConfiguration{
|
sdkConfiguration: config.SDKConfiguration{
|
||||||
UserAgent: "speakeasy-sdk/go 0.23.0 2.623.4 0.0.3 github.com/LukeHagar/plexgo",
|
UserAgent: "speakeasy-sdk/go 0.24.1 2.674.3 0.0.3 github.com/LukeHagar/plexgo",
|
||||||
ServerList: ServerList,
|
ServerList: ServerList,
|
||||||
ServerVariables: []map[string]string{
|
ServerVariables: []map[string]string{
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user