{"id":16633499,"url":"https://github.com/lukehagar/plexswift","last_synced_at":"2025-10-30T04:31:37.743Z","repository":{"id":213900710,"uuid":"735218300","full_name":"LukeHagar/plexswift","owner":"LukeHagar","description":"An open source Plex Media Server Swift SDK","archived":false,"fork":false,"pushed_at":"2025-02-08T00:09:15.000Z","size":1380,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T04:54:20.933Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LukeHagar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-24T05:06:28.000Z","updated_at":"2025-02-08T00:09:15.000Z","dependencies_parsed_at":"2024-05-28T04:21:57.951Z","dependency_job_id":"6c4edce8-4533-4d4a-97a1-e123b96c2146","html_url":"https://github.com/LukeHagar/plexswift","commit_stats":null,"previous_names":["lukehagar/plexswift"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeHagar%2Fplexswift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeHagar%2Fplexswift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeHagar%2Fplexswift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeHagar%2Fplexswift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LukeHagar","download_url":"https://codeload.github.com/LukeHagar/plexswift/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238934083,"owners_count":19554788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T05:23:48.297Z","updated_at":"2025-10-30T04:31:37.737Z","avatar_url":"https://github.com/LukeHagar.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plexswift\n\n\u003ca href=\"https://speakeasyapi.dev/\"\u003e\u003cimg src=\"https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge\u0026logoColor=FBE331\u0026logo=speakeasy\u0026labelColor=545454\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" style=\"width: 100px; height: 28px;\" /\u003e\n\u003c/a\u003e\n![Platform](https://img.shields.io/badge/Platform-iOS-lightgray)\n![Swift Version](https://img.shields.io/badge/Swift-5.6-orange.svg)\n\nAn Open API Spec for interacting with Plex.tv and Plex Servers\n\n## Requirements\n\nThe SDK supports iOS 13 and later.\n\n\u003c!-- Start Summary [summary] --\u003e\n## Summary\n\nPlex-API: An Open API Spec for interacting with Plex.tv and Plex Media Server\n\n# Plex Media Server OpenAPI Specification\n\nAn Open Source OpenAPI Specification for Plex Media Server\n\nAutomation and SDKs provided by [Speakeasy](https://speakeasyapi.dev/)\n\n## Documentation\n\n[API Documentation](https://plexapi.dev)\n\n## SDKs\n\nThe following SDKs are generated from the OpenAPI Specification. They are automatically generated and may not be fully tested. If you find any issues, please open an issue on the [main specification Repository](https://github.com/LukeHagar/plex-api-spec).\n\n| Language              | Repository                                        | Releases                                                                                         | Other                                                   |\n| --------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |\n| Python                | [GitHub](https://github.com/LukeHagar/plexpy)     | [PyPI](https://pypi.org/project/plex-api-client/)                                                | -                                                       |\n| JavaScript/TypeScript | [GitHub](https://github.com/LukeHagar/plexjs)     | [NPM](https://www.npmjs.com/package/@lukehagar/plexjs) \\ [JSR](https://jsr.io/@lukehagar/plexjs) | -                                                       |\n| Go                    | [GitHub](https://github.com/LukeHagar/plexgo)     | [Releases](https://github.com/LukeHagar/plexgo/releases)                                         | [GoDoc](https://pkg.go.dev/github.com/LukeHagar/plexgo) |\n| Ruby                  | [GitHub](https://github.com/LukeHagar/plexruby)   | [Releases](https://github.com/LukeHagar/plexruby/releases)                                       | -                                                       |\n| Swift                 | [GitHub](https://github.com/LukeHagar/plexswift)  | [Releases](https://github.com/LukeHagar/plexswift/releases)                                      | -                                                       |\n| PHP                   | [GitHub](https://github.com/LukeHagar/plexphp)    | [Releases](https://github.com/LukeHagar/plexphp/releases)                                        | -                                                       |\n| Java                  | [GitHub](https://github.com/LukeHagar/plexjava)   | [Releases](https://github.com/LukeHagar/plexjava/releases)                                       | -                                                       |\n| C#                    | [GitHub](https://github.com/LukeHagar/plexcsharp) | [Releases](https://github.com/LukeHagar/plexcsharp/releases)                                     | -\n\u003c!-- End Summary [summary] --\u003e\n\n\u003c!-- Start Table of Contents [toc] --\u003e\n## Table of Contents\n\n* [SDK Installation](#sdk-installation)\n* [SDK Example Usage](#sdk-example-usage)\n* [Available Resources and Operations](#available-resources-and-operations)\n* [Authentication](#authentication)\n\u003c!-- End Table of Contents [toc] --\u003e\n\n\u003c!-- Start SDK Installation [installation] --\u003e\n## SDK Installation\n\nThe SDK uses the [Swift Package Manager](https://www.swift.org/documentation/package-manager/) to handle dependencies, which is included in Swift 3.0 and above.\n\nYou can add `plexswift` to your project directly in Xcode `(File \u003e Add Packages...)` or by adding it to your project's Package.swift file:\n\n```bash\ndependencies: [\n    .package(url: \"https://github.com/LukeHagar/plexswift.git\", .upToNextMajor(from: \"0.10.5\"))\n]\n```\n\u003c!-- End SDK Installation [installation] --\u003e\n\n\u003c!-- Start SDK Example Usage [usage] --\u003e\n## SDK Example Usage\n\n### Example\n\n```swift\nimport Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"\u003cYOUR_API_KEY_HERE\u003e\"))\n\nlet response = try await client.server.getServerCapabilities()\n\nswitch response.data {\ncase .object(let object):\n    // Handle response\n    break\ncase .badRequest(let badRequest):\n    // Handle response\n    break\ncase .unauthorized(let unauthorized):\n    // Handle response\n    break\ncase .empty:\n    // Handle empty response\n    break\n}\n\n```\n\u003c!-- End SDK Example Usage [usage] --\u003e\n\n\u003c!-- Start Available Resources and Operations [operations] --\u003e\n## Available Resources and Operations\n\n\u003cdetails open\u003e\n\u003csummary\u003eAvailable methods\u003c/summary\u003e\n\n### [Activities](docs/sdks/activities/README.md)\n\n* [getServerActivities](docs/sdks/activities/README.md#getserveractivities) - Get Server Activities\n* [cancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - Cancel Server Activities\n\n### [Authentication](docs/sdks/authentication/README.md)\n\n* [getTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token\n* [getSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information\n* [getTokenDetails](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details\n* [postUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data\n\n### [Butler](docs/sdks/butler/README.md)\n\n* [getButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - Get Butler tasks\n* [startAllTasks](docs/sdks/butler/README.md#startalltasks) - Start all Butler tasks\n* [stopAllTasks](docs/sdks/butler/README.md#stopalltasks) - Stop all Butler tasks\n* [startTask](docs/sdks/butler/README.md#starttask) - Start a single Butler task\n* [stopTask](docs/sdks/butler/README.md#stoptask) - Stop a single Butler task\n\n### [Hubs](docs/sdks/hubs/README.md)\n\n* [getGlobalHubs](docs/sdks/hubs/README.md#getglobalhubs) - Get Global Hubs\n* [getRecentlyAdded](docs/sdks/hubs/README.md#getrecentlyadded) - Get Recently Added\n* [getLibraryHubs](docs/sdks/hubs/README.md#getlibraryhubs) - Get library specific hubs\n\n### [Library](docs/sdks/library/README.md)\n\n* [getFileHash](docs/sdks/library/README.md#getfilehash) - Get Hash Value\n* [getRecentlyAddedLibrary](docs/sdks/library/README.md#getrecentlyaddedlibrary) - Get Recently Added\n* [getAllLibraries](docs/sdks/library/README.md#getalllibraries) - Get All Libraries\n* [getLibraryDetails](docs/sdks/library/README.md#getlibrarydetails) - Get Library Details\n* [deleteLibrary](docs/sdks/library/README.md#deletelibrary) - Delete Library Section\n* [getLibraryItems](docs/sdks/library/README.md#getlibraryitems) - Get Library Items\n* [getAllMediaLibrary](docs/sdks/library/README.md#getallmedialibrary) - Get all media of library\n* [getRefreshLibraryMetadata](docs/sdks/library/README.md#getrefreshlibrarymetadata) - Refresh Metadata Of The Library\n* [getSearchLibrary](docs/sdks/library/README.md#getsearchlibrary) - Search Library\n* [getGenresLibrary](docs/sdks/library/README.md#getgenreslibrary) - Get Genres of library media\n* [getCountriesLibrary](docs/sdks/library/README.md#getcountrieslibrary) - Get Countries of library media\n* [getActorsLibrary](docs/sdks/library/README.md#getactorslibrary) - Get Actors of library media\n* [getSearchAllLibraries](docs/sdks/library/README.md#getsearchalllibraries) - Search All Libraries\n* [getMediaMetaData](docs/sdks/library/README.md#getmediametadata) - Get Media Metadata\n* [getMetadataChildren](docs/sdks/library/README.md#getmetadatachildren) - Get Items Children\n* [getTopWatchedContent](docs/sdks/library/README.md#gettopwatchedcontent) - Get Top Watched Content\n\n### [Log](docs/sdks/log/README.md)\n\n* [logLine](docs/sdks/log/README.md#logline) - Logging a single line message.\n* [logMultiLine](docs/sdks/log/README.md#logmultiline) - Logging a multi-line message\n* [enablePaperTrail](docs/sdks/log/README.md#enablepapertrail) - Enabling Papertrail\n\n### [Media](docs/sdks/media/README.md)\n\n* [markPlayed](docs/sdks/media/README.md#markplayed) - Mark Media Played\n* [markUnplayed](docs/sdks/media/README.md#markunplayed) - Mark Media Unplayed\n* [updatePlayProgress](docs/sdks/media/README.md#updateplayprogress) - Update Media Play Progress\n* [getBannerImage](docs/sdks/media/README.md#getbannerimage) - Get Banner Image\n* [getThumbImage](docs/sdks/media/README.md#getthumbimage) - Get Thumb Image\n\n### [Playlists](docs/sdks/playlists/README.md)\n\n* [createPlaylist](docs/sdks/playlists/README.md#createplaylist) - Create a Playlist\n* [getPlaylists](docs/sdks/playlists/README.md#getplaylists) - Get All Playlists\n* [getPlaylist](docs/sdks/playlists/README.md#getplaylist) - Retrieve Playlist\n* [deletePlaylist](docs/sdks/playlists/README.md#deleteplaylist) - Deletes a Playlist\n* [updatePlaylist](docs/sdks/playlists/README.md#updateplaylist) - Update a Playlist\n* [getPlaylistContents](docs/sdks/playlists/README.md#getplaylistcontents) - Retrieve Playlist Contents\n* [clearPlaylistContents](docs/sdks/playlists/README.md#clearplaylistcontents) - Delete Playlist Contents\n* [addPlaylistContents](docs/sdks/playlists/README.md#addplaylistcontents) - Adding to a Playlist\n* [uploadPlaylist](docs/sdks/playlists/README.md#uploadplaylist) - Upload Playlist\n\n### [Plex](docs/sdks/plex/README.md)\n\n* [getCompanionsData](docs/sdks/plex/README.md#getcompanionsdata) - Get Companions Data\n* [getUserFriends](docs/sdks/plex/README.md#getuserfriends) - Get list of friends of the user logged in\n* [getGeoData](docs/sdks/plex/README.md#getgeodata) - Get Geo Data\n* [getHomeData](docs/sdks/plex/README.md#gethomedata) - Get Plex Home Data\n* [getServerResources](docs/sdks/plex/README.md#getserverresources) - Get Server Resources\n* [getPin](docs/sdks/plex/README.md#getpin) - Get a Pin\n* [getTokenByPinId](docs/sdks/plex/README.md#gettokenbypinid) - Get Access Token by PinId\n\n\n### [Search](docs/sdks/search/README.md)\n\n* [performSearch](docs/sdks/search/README.md#performsearch) - Perform a search\n* [performVoiceSearch](docs/sdks/search/README.md#performvoicesearch) - Perform a voice search\n* [getSearchResults](docs/sdks/search/README.md#getsearchresults) - Get Search Results\n\n### [Server](docs/sdks/server/README.md)\n\n* [getServerCapabilities](docs/sdks/server/README.md#getservercapabilities) - Get Server Capabilities\n* [getServerPreferences](docs/sdks/server/README.md#getserverpreferences) - Get Server Preferences\n* [getAvailableClients](docs/sdks/server/README.md#getavailableclients) - Get Available Clients\n* [getDevices](docs/sdks/server/README.md#getdevices) - Get Devices\n* [getServerIdentity](docs/sdks/server/README.md#getserveridentity) - Get Server Identity\n* [getMyPlexAccount](docs/sdks/server/README.md#getmyplexaccount) - Get MyPlex Account\n* [getResizedPhoto](docs/sdks/server/README.md#getresizedphoto) - Get a Resized Photo\n* [getMediaProviders](docs/sdks/server/README.md#getmediaproviders) - Get Media Providers\n* [getServerList](docs/sdks/server/README.md#getserverlist) - Get Server List\n\n### [Sessions](docs/sdks/sessions/README.md)\n\n* [getSessions](docs/sdks/sessions/README.md#getsessions) - Get Active Sessions\n* [getSessionHistory](docs/sdks/sessions/README.md#getsessionhistory) - Get Session History\n* [getTranscodeSessions](docs/sdks/sessions/README.md#gettranscodesessions) - Get Transcode Sessions\n* [stopTranscodeSession](docs/sdks/sessions/README.md#stoptranscodesession) - Stop a Transcode Session\n\n### [Statistics](docs/sdks/statistics/README.md)\n\n* [getStatistics](docs/sdks/statistics/README.md#getstatistics) - Get Media Statistics\n* [getResourcesStatistics](docs/sdks/statistics/README.md#getresourcesstatistics) - Get Resources Statistics\n* [getBandwidthStatistics](docs/sdks/statistics/README.md#getbandwidthstatistics) - Get Bandwidth Statistics\n\n### [Updater](docs/sdks/updater/README.md)\n\n* [getUpdateStatus](docs/sdks/updater/README.md#getupdatestatus) - Querying status of updates\n* [checkForUpdates](docs/sdks/updater/README.md#checkforupdates) - Checking for updates\n* [applyUpdates](docs/sdks/updater/README.md#applyupdates) - Apply Updates\n\n### [Users](docs/sdks/users/README.md)\n\n* [getUsers](docs/sdks/users/README.md#getusers) - Get list of all connected users\n\n### [Video](docs/sdks/video/README.md)\n\n* [getTimeline](docs/sdks/video/README.md#gettimeline) - Get the timeline for a media item\n* [startUniversalTranscode](docs/sdks/video/README.md#startuniversaltranscode) - Start Universal Transcode\n\n### [Watchlist](docs/sdks/watchlist/README.md)\n\n* [getWatchList](docs/sdks/watchlist/README.md#getwatchlist) - Get User Watchlist\n\n\u003c/details\u003e\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\u003c!-- Start Authentication [security] --\u003e\n## Authentication\n\n### Global Security Schemes\n\nThe SDK supports the following security scheme globally through the `Shared.Security` type:\n\n| Name           | Type           | Scheme         |\n| -------------- | -------------- | -------------- |\n| `.accessToken` | apiKey         | API key        |\n\nYou can set the appropriate security parameters by passing a `Shared.Security` value for the `security` parameter when initializing the `Client` instance. For example:\n\n```swift\nimport Foundation\nimport Plexswift\n\nlet client = Client(security: .accessToken(\"\u003cYOUR_API_KEY_HERE\u003e\"))\n\nlet response = try await client.server.getServerCapabilities()\n\nswitch response.data {\ncase .object(let object):\n    // Handle response\n    break\ncase .badRequest(let badRequest):\n    // Handle response\n    break\ncase .unauthorized(let unauthorized):\n    // Handle response\n    break\ncase .empty:\n    // Handle empty response\n    break\n}\n\n```\n\u003c!-- End Authentication [security] --\u003e\n\n\u003c!-- Placeholder for Future Speakeasy SDK Sections --\u003e\n\n# Development\n\n## Maturity\n\nThis SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage\nto a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally\nlooking for the latest version.\n\n## Contributions\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically.\nFeel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!\n\n### SDK Created by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukehagar%2Fplexswift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukehagar%2Fplexswift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukehagar%2Fplexswift/lists"}