{"id":16633496,"url":"https://github.com/lukehagar/plexruby","last_synced_at":"2025-10-30T04:31:33.820Z","repository":{"id":213900720,"uuid":"735218177","full_name":"LukeHagar/plexruby","owner":"LukeHagar","description":"An open source Plex Media Server ruby SDK","archived":false,"fork":false,"pushed_at":"2025-02-08T00:09:02.000Z","size":3358,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T04:54:20.929Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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:05:47.000Z","updated_at":"2025-02-08T00:09:03.000Z","dependencies_parsed_at":"2024-05-02T02:00:07.213Z","dependency_job_id":"5cb03954-a702-4584-a1d4-ef00cfbe354e","html_url":"https://github.com/LukeHagar/plexruby","commit_stats":null,"previous_names":["lukehagar/plexruby"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeHagar%2Fplexruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeHagar%2Fplexruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeHagar%2Fplexruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeHagar%2Fplexruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LukeHagar","download_url":"https://codeload.github.com/LukeHagar/plexruby/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:46.750Z","updated_at":"2025-10-30T04:31:33.815Z","avatar_url":"https://github.com/LukeHagar.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# plexruby\n\n\u003cdiv align=\"left\"\u003e\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\u003c/div\u003e\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\u003c!-- $toc-max-depth=2 --\u003e\n* [plexruby](#plexruby)\n* [Plex Media Server OpenAPI Specification](#plex-media-server-openapi-specification)\n  * [Documentation](#documentation)\n  * [SDKs](#sdks)\n  * [SDK Installation](#sdk-installation)\n  * [SDK Example Usage](#sdk-example-usage)\n  * [Authentication](#authentication)\n  * [Available Resources and Operations](#available-resources-and-operations)\n  * [Error Handling](#error-handling)\n  * [Server Selection](#server-selection)\n* [Development](#development)\n  * [Maturity](#maturity)\n  * [Contributions](#contributions)\n\n\u003c!-- End Table of Contents [toc] --\u003e\n\n\u003c!-- Start SDK Installation [installation] --\u003e\n## SDK Installation\n\nThe SDK can be installed using [RubyGems](https://rubygems.org/):\n\n```bash\ngem install plex_ruby_sdk\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```ruby\nrequire 'plex_ruby_sdk'\n\ns = ::PlexRubySDK::PlexAPI.new(\n      security: Models::Shared::Security.new(\n        access_token: \"\u003cYOUR_API_KEY_HERE\u003e\",\n      ),\n    )\n\nres = s.server.get_server_capabilities()\n\nif ! res.object.nil?\n  # handle response\nend\n\n```\n\u003c!-- End SDK Example Usage [usage] --\u003e\n\n\u003c!-- Start Authentication [security] --\u003e\n## Authentication\n\n### Per-Client Security Schemes\n\nThis SDK supports the following security scheme globally:\n\n| Name           | Type   | Scheme  |\n| -------------- | ------ | ------- |\n| `access_token` | apiKey | API key |\n\nYou can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:\n```ruby\nrequire 'plex_ruby_sdk'\n\ns = ::PlexRubySDK::PlexAPI.new(\n      security: Models::Shared::Security.new(\n        access_token: \"\u003cYOUR_API_KEY_HERE\u003e\",\n      ),\n    )\n\nres = s.server.get_server_capabilities()\n\nif ! res.object.nil?\n  # handle response\nend\n\n```\n\u003c!-- End Authentication [security] --\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* [get_server_activities](docs/sdks/activities/README.md#get_server_activities) - Get Server Activities\n* [cancel_server_activities](docs/sdks/activities/README.md#cancel_server_activities) - Cancel Server Activities\n\n### [authentication](docs/sdks/authentication/README.md)\n\n* [get_transient_token](docs/sdks/authentication/README.md#get_transient_token) - Get a Transient Token\n* [get_source_connection_information](docs/sdks/authentication/README.md#get_source_connection_information) - Get Source Connection Information\n* [get_token_details](docs/sdks/authentication/README.md#get_token_details) - Get Token Details\n* [post_users_sign_in_data](docs/sdks/authentication/README.md#post_users_sign_in_data) - Get User Sign In Data\n\n### [butler](docs/sdks/butler/README.md)\n\n* [get_butler_tasks](docs/sdks/butler/README.md#get_butler_tasks) - Get Butler tasks\n* [start_all_tasks](docs/sdks/butler/README.md#start_all_tasks) - Start all Butler tasks\n* [stop_all_tasks](docs/sdks/butler/README.md#stop_all_tasks) - Stop all Butler tasks\n* [start_task](docs/sdks/butler/README.md#start_task) - Start a single Butler task\n* [stop_task](docs/sdks/butler/README.md#stop_task) - Stop a single Butler task\n\n### [hubs](docs/sdks/hubs/README.md)\n\n* [get_global_hubs](docs/sdks/hubs/README.md#get_global_hubs) - Get Global Hubs\n* [get_recently_added](docs/sdks/hubs/README.md#get_recently_added) - Get Recently Added\n* [get_library_hubs](docs/sdks/hubs/README.md#get_library_hubs) - Get library specific hubs\n\n### [library](docs/sdks/library/README.md)\n\n* [get_file_hash](docs/sdks/library/README.md#get_file_hash) - Get Hash Value\n* [get_recently_added_library](docs/sdks/library/README.md#get_recently_added_library) - Get Recently Added\n* [get_all_libraries](docs/sdks/library/README.md#get_all_libraries) - Get All Libraries\n* [get_library_details](docs/sdks/library/README.md#get_library_details) - Get Library Details\n* [delete_library](docs/sdks/library/README.md#delete_library) - Delete Library Section\n* [get_library_items](docs/sdks/library/README.md#get_library_items) - Get Library Items\n* [get_library_sections_all](docs/sdks/library/README.md#get_library_sections_all) - Get Library section media by tag ALL\n* [get_refresh_library_metadata](docs/sdks/library/README.md#get_refresh_library_metadata) - Refresh Metadata Of The Library\n* [get_search_library](docs/sdks/library/README.md#get_search_library) - Search Library\n* [get_genres_library](docs/sdks/library/README.md#get_genres_library) - Get Genres of library media\n* [get_countries_library](docs/sdks/library/README.md#get_countries_library) - Get Countries of library media\n* [get_actors_library](docs/sdks/library/README.md#get_actors_library) - Get Actors of library media\n* [get_search_all_libraries](docs/sdks/library/README.md#get_search_all_libraries) - Search All Libraries\n* [get_media_meta_data](docs/sdks/library/README.md#get_media_meta_data) - Get Media Metadata\n* [get_media_arts](docs/sdks/library/README.md#get_media_arts) - Get Media Background Artwork\n* [post_media_arts](docs/sdks/library/README.md#post_media_arts) - Upload Media Background Artwork\n* [get_media_posters](docs/sdks/library/README.md#get_media_posters) - Get Media Posters\n* [post_media_poster](docs/sdks/library/README.md#post_media_poster) - Upload Media Poster\n* [get_metadata_children](docs/sdks/library/README.md#get_metadata_children) - Get Items Children\n* [get_top_watched_content](docs/sdks/library/README.md#get_top_watched_content) - Get Top Watched Content\n\n### [log](docs/sdks/log/README.md)\n\n* [log_line](docs/sdks/log/README.md#log_line) - Logging a single line message.\n* [log_multi_line](docs/sdks/log/README.md#log_multi_line) - Logging a multi-line message\n* [enable_paper_trail](docs/sdks/log/README.md#enable_paper_trail) - Enabling Papertrail\n\n### [media](docs/sdks/media/README.md)\n\n* [mark_played](docs/sdks/media/README.md#mark_played) - Mark Media Played\n* [mark_unplayed](docs/sdks/media/README.md#mark_unplayed) - Mark Media Unplayed\n* [update_play_progress](docs/sdks/media/README.md#update_play_progress) - Update Media Play Progress\n* [get_banner_image](docs/sdks/media/README.md#get_banner_image) - Get Banner Image\n* [get_thumb_image](docs/sdks/media/README.md#get_thumb_image) - Get Thumb Image\n\n### [playlists](docs/sdks/playlists/README.md)\n\n* [create_playlist](docs/sdks/playlists/README.md#create_playlist) - Create a Playlist\n* [get_playlists](docs/sdks/playlists/README.md#get_playlists) - Get All Playlists\n* [get_playlist](docs/sdks/playlists/README.md#get_playlist) - Retrieve Playlist\n* [delete_playlist](docs/sdks/playlists/README.md#delete_playlist) - Deletes a Playlist\n* [update_playlist](docs/sdks/playlists/README.md#update_playlist) - Update a Playlist\n* [get_playlist_contents](docs/sdks/playlists/README.md#get_playlist_contents) - Retrieve Playlist Contents\n* [clear_playlist_contents](docs/sdks/playlists/README.md#clear_playlist_contents) - Delete Playlist Contents\n* [add_playlist_contents](docs/sdks/playlists/README.md#add_playlist_contents) - Adding to a Playlist\n* [upload_playlist](docs/sdks/playlists/README.md#upload_playlist) - Upload Playlist\n\n### [plex](docs/sdks/plex/README.md)\n\n* [get_companions_data](docs/sdks/plex/README.md#get_companions_data) - Get Companions Data\n* [get_user_friends](docs/sdks/plex/README.md#get_user_friends) - Get list of friends of the user logged in\n* [get_geo_data](docs/sdks/plex/README.md#get_geo_data) - Get Geo Data\n* [get_home_data](docs/sdks/plex/README.md#get_home_data) - Get Plex Home Data\n* [get_server_resources](docs/sdks/plex/README.md#get_server_resources) - Get Server Resources\n* [get_pin](docs/sdks/plex/README.md#get_pin) - Get a Pin\n* [get_token_by_pin_id](docs/sdks/plex/README.md#get_token_by_pin_id) - Get Access Token by PinId\n\n\n### [search](docs/sdks/search/README.md)\n\n* [perform_search](docs/sdks/search/README.md#perform_search) - Perform a search\n* [perform_voice_search](docs/sdks/search/README.md#perform_voice_search) - Perform a voice search\n* [get_search_results](docs/sdks/search/README.md#get_search_results) - Get Search Results\n\n### [server](docs/sdks/server/README.md)\n\n* [get_server_capabilities](docs/sdks/server/README.md#get_server_capabilities) - Get Server Capabilities\n* [get_server_preferences](docs/sdks/server/README.md#get_server_preferences) - Get Server Preferences\n* [get_available_clients](docs/sdks/server/README.md#get_available_clients) - Get Available Clients\n* [get_devices](docs/sdks/server/README.md#get_devices) - Get Devices\n* [get_server_identity](docs/sdks/server/README.md#get_server_identity) - Get Server Identity\n* [get_my_plex_account](docs/sdks/server/README.md#get_my_plex_account) - Get MyPlex Account\n* [get_resized_photo](docs/sdks/server/README.md#get_resized_photo) - Get a Resized Photo\n* [get_media_providers](docs/sdks/server/README.md#get_media_providers) - Get Media Providers\n* [get_server_list](docs/sdks/server/README.md#get_server_list) - Get Server List\n\n### [sessions](docs/sdks/sessions/README.md)\n\n* [get_sessions](docs/sdks/sessions/README.md#get_sessions) - Get Active Sessions\n* [get_session_history](docs/sdks/sessions/README.md#get_session_history) - Get Session History\n* [get_transcode_sessions](docs/sdks/sessions/README.md#get_transcode_sessions) - Get Transcode Sessions\n* [stop_transcode_session](docs/sdks/sessions/README.md#stop_transcode_session) - Stop a Transcode Session\n\n### [statistics](docs/sdks/statistics/README.md)\n\n* [get_statistics](docs/sdks/statistics/README.md#get_statistics) - Get Media Statistics\n* [get_resources_statistics](docs/sdks/statistics/README.md#get_resources_statistics) - Get Resources Statistics\n* [get_bandwidth_statistics](docs/sdks/statistics/README.md#get_bandwidth_statistics) - Get Bandwidth Statistics\n\n### [updater](docs/sdks/updater/README.md)\n\n* [get_update_status](docs/sdks/updater/README.md#get_update_status) - Querying status of updates\n* [check_for_updates](docs/sdks/updater/README.md#check_for_updates) - Checking for updates\n* [apply_updates](docs/sdks/updater/README.md#apply_updates) - Apply Updates\n\n### [users](docs/sdks/users/README.md)\n\n* [get_users](docs/sdks/users/README.md#get_users) - Get list of all connected users\n\n### [video](docs/sdks/video/README.md)\n\n* [get_timeline](docs/sdks/video/README.md#get_timeline) - Get the timeline for a media item\n* [start_universal_transcode](docs/sdks/video/README.md#start_universal_transcode) - Start Universal Transcode\n\n### [watchlist](docs/sdks/watchlist/README.md)\n\n* [get_watch_list](docs/sdks/watchlist/README.md#get_watch_list) - Get User Watchlist\n\n\u003c/details\u003e\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\u003c!-- Start Error Handling [errors] --\u003e\n## Error Handling\n\nHandling errors in this SDK should largely match your expectations. All operations return a response object or raise an error.\n\nBy default an API error will raise a `Errors::APIError`, which has the following properties:\n\n| Property       | Type                                    | Description           |\n|----------------|-----------------------------------------|-----------------------|\n| `message`     | *string*                                 | The error message     |\n| `status_code`  | *int*                                   | The HTTP status code  |\n| `raw_response` | *Faraday::Response*                     | The raw HTTP response |\n| `body`        | *string*                                 | The response content  |\n\nWhen custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `get_server_capabilities` method throws the following exceptions:\n\n| Error Type                                        | Status Code | Content Type     |\n| ------------------------------------------------- | ----------- | ---------------- |\n| Models::Errors::GetServerCapabilitiesBadRequest   | 400         | application/json |\n| Models::Errors::GetServerCapabilitiesUnauthorized | 401         | application/json |\n| Errors::APIError                                  | 4XX, 5XX    | \\*/\\*            |\n\n### Example\n\n```ruby\nrequire 'plex_ruby_sdk'\n\ns = ::PlexRubySDK::PlexAPI.new(\n      security: Models::Shared::Security.new(\n        access_token: '\u003cYOUR_API_KEY_HERE\u003e',\n      ),\n    )\n\nbegin\n    res = s.server.get_server_capabilities()\n\n    if ! res.object.nil?\n      # handle response\n    end\nrescue Models::Errors::GetServerCapabilitiesBadRequest =\u003e e\n  # handle $e-\u003e$container data\n  throw $e;\nrescue Models::Errors::GetServerCapabilitiesUnauthorized =\u003e e\n  # handle $e-\u003e$container data\n  throw $e;\nrescue Errors::APIError =\u003e e\n  # handle default exception\n  raise e\nend\n\n```\n\u003c!-- End Error Handling [errors] --\u003e\n\n\u003c!-- Start Server Selection [server] --\u003e\n## Server Selection\n\n### Server Variables\n\nThe default server `{protocol}://{ip}:{port}` contains variables and is set to `https://10.10.10.47:32400` by default. To override default values, the following parameters are available when initializing the SDK client instance:\n\n| Variable   | Parameter                                                           | Supported Values           | Default         | Description                                    |\n| ---------- | ------------------------------------------------------------------- | -------------------------- | --------------- | ---------------------------------------------- |\n| `protocol` | `protocol (::PlexRubySDK::Models::ServerVariables::ServerProtocol)` | - `\"http\"`\u003cbr/\u003e- `\"https\"` | `\"https\"`       | The protocol to use for the server connection  |\n| `ip`       | `ip (::String)`                                                     | ::String                   | `\"10.10.10.47\"` | The IP address or hostname of your Plex Server |\n| `port`     | `port (::String)`                                                   | ::String                   | `\"32400\"`       | The port of your Plex Server                   |\n\n#### Example\n\n```ruby\nrequire 'plex_ruby_sdk'\n\ns = ::PlexRubySDK::PlexAPI.new(\n      protocol: \"https\",\n      ip: \"e0c3:bcc0:6bac:dccc:c4ec:34b1:ca98:4cb9\",\n      port: \"40311\",\n      security: Models::Shared::Security.new(\n        access_token: \"\u003cYOUR_API_KEY_HERE\u003e\",\n      ),\n    )\n\nres = s.server.get_server_capabilities()\n\nif ! res.object.nil?\n  # handle response\nend\n\n```\n\n### Override Server URL Per-Client\n\nThe default server can be overridden globally by passing a URL to the `server_url (String)` optional parameter when initializing the SDK client instance. For example:\n```ruby\nrequire 'plex_ruby_sdk'\n\ns = ::PlexRubySDK::PlexAPI.new(\n      server_url: \"https://10.10.10.47:32400\",\n      security: Models::Shared::Security.new(\n        access_token: \"\u003cYOUR_API_KEY_HERE\u003e\",\n      ),\n    )\n\nres = s.server.get_server_capabilities()\n\nif ! res.object.nil?\n  # handle response\nend\n\n```\n\n### Override Server URL Per-Operation\n\nThe server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:\n```ruby\nrequire 'plex_ruby_sdk'\n\ns = ::PlexRubySDK::PlexAPI.new(\n      security: Models::Shared::Security.new(\n        access_token: \"\u003cYOUR_API_KEY_HERE\u003e\",\n      ),\n    )\n\nres = s.plex.get_companions_data(server_url: \"https://plex.tv/api/v2\")\n\nif ! res.response_bodies.nil?\n  # handle response\nend\n\n```\n\u003c!-- End Server Selection [server] --\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%2Fplexruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukehagar%2Fplexruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukehagar%2Fplexruby/lists"}