{"id":19312546,"url":"https://github.com/muxinc/mux-go","last_synced_at":"2025-04-05T03:10:55.408Z","repository":{"id":34763036,"uuid":"174227628","full_name":"muxinc/mux-go","owner":"muxinc","description":"Official Mux API wrapper for golang projects, supporting both Mux Data and Mux Video.","archived":false,"fork":false,"pushed_at":"2025-03-26T13:38:33.000Z","size":873,"stargazers_count":92,"open_issues_count":9,"forks_count":22,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-03-29T02:07:27.597Z","etag":null,"topics":["go","golang","mux","video","video-analytics","video-processing","video-streaming"],"latest_commit_sha":null,"homepage":"","language":"Go","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/muxinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-06T21:59:12.000Z","updated_at":"2025-03-22T18:07:51.000Z","dependencies_parsed_at":"2023-12-20T08:56:39.863Z","dependency_job_id":"b0e8bf8a-d898-4e95-a165-7737113b93be","html_url":"https://github.com/muxinc/mux-go","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxinc%2Fmux-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxinc%2Fmux-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxinc%2Fmux-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxinc%2Fmux-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muxinc","download_url":"https://codeload.github.com/muxinc/mux-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"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":["go","golang","mux","video","video-analytics","video-processing","video-streaming"],"created_at":"2024-11-10T00:35:17.802Z","updated_at":"2025-04-05T03:10:55.401Z","avatar_url":"https://github.com/muxinc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Mux Go Banner](https://banner.mux.dev/?image=go)\n\n![](https://github.com/muxinc/mux-go/workflows/Integration%20Test/badge.svg)\n[![GoDoc](https://godoc.org/github.com/muxinc/mux-go?status.svg)](https://godoc.org/github.com/muxinc/mux-go)\n\n# Mux Go\n\nOfficial Mux API wrapper for golang projects, supporting both Mux Data and Mux Video.\n\n[Mux Video](https://mux.com/video) is an API-first platform, powered by data and designed by video experts to make beautiful video possible for every development team.\n\n[Mux Data](https://mux.com/data) is a platform for monitoring your video streaming performance with just a few lines of code. Get in-depth quality of service analytics on web, mobile, and OTT devices.\n\nNot familiar with Mux? Check out https://mux.com/ for more information.\n\n## Installation\n\n```\ngo get github.com/muxinc/mux-go/v7\n```\n\n## Getting Started\n\n### Overview\n\nMux Go is a code generated lightweight wrapper around the Mux REST API and reflects them accurately. This has a few consequences you should watch out for:\n\n1) For almost all API responses, the object you're looking for will be in the `data` field on the API response object, as in the example below. This is because we designed our APIs with similar concepts to the [JSON:API](https://jsonapi.org/) standard. This means we'll be able to return more metadata from our API calls (such as related entities) without the need to make breaking changes to our APIs. We've decided not to hide that in this library.\n\n2) We don't use a lot of object orientation. For example API calls that happen on a single asset don't exist in the asset class, but are API calls in the AssetsApi which require an asset ID.\n\n### Authentication\n\nTo use the Mux API, you'll need an access token and a secret. [Details on obtaining these can be found here in the Mux documentation.](https://docs.mux.com/docs#section-1-get-an-api-access-token)\n\nIts up to you to manage your token and secret. In our examples, we read them from `MUX_TOKEN_ID` and `MUX_TOKEN_SECRET` in your environment.\n\n### Example Usage\n\nBelow is a quick example of using mux-go to list the Video assets stored in your Mux account.\n\nBe sure to also checkout the [exmples directory](examples/).\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/muxinc/mux-go/v7\"\n)\n\nfunc main() {\n\t// API Client Init\n\tclient := muxgo.NewAPIClient(\n\t\tmuxgo.NewConfiguration(\n\t\t\tmuxgo.WithBasicAuth(os.Getenv(\"MUX_TOKEN_ID\"), os.Getenv(\"MUX_TOKEN_SECRET\")),\n\t\t))\n\n\t// List Assets\n\tfmt.Println(\"Listing Assets...\\n\")\n\tr, err := client.AssetsApi.ListAssets()\n\tif err != nil {\n\t\tfmt.Printf(\"err: %s \\n\\n\", err)\n\t\tos.Exit(255)\n\t}\n\tfor _, asset := range r.Data {\n\t\tfmt.Printf(\"Asset ID: %s\\n\", asset.Id)\n\t\tfmt.Printf(\"Status: %s\\n\", asset.Status)\n\t\tfmt.Printf(\"Duration: %f\\n\\n\", asset.Duration)\n\t}\n}\n```\n\n## Errors \u0026 Error Handling\n\nAll API calls return an err as their final return value. Below is documented the errors you might want to check for. You can check `error.Body` on all errors to see the full HTTP response.\n\n### BadRequestError\n\n`BadRequestError` is returned when a you make a bad request to Mux, this likely means you've passed in an invalid parameter to the API call. \n\n### UnauthorizedError\n\n`UnauthorizedError` is returned when Mux cannot authenticate your request. [You should check you have configured your credentials correctly.](#authentication)\n\n### ForbiddenError\n\n`ForbiddenError` is returned you don't have permission to access that resource. [You should check you have configured your credentials correctly.](#authentication)\n\n### NotFoundError\n\n`NotFoundError` is returned when a resource is not found. This is useful when trying to get an entity by its ID.\n\n### TooManyRequestsError\n\n`TooManyRequestsError` is returned when you exceed the maximum number of requests allowed for a given time period. Please get in touch with [support@mux.com](mailto:support@mux.com) if you need to talk about this limit.\n\n### ServiceError\n\n`ServiceError` is returned when Mux returns a HTTP 5XX Status Code. If you encounter this reproducibly, please get in touch with [support@mux.com](mailto:support@mux.com).\n\n### GenericOpenAPIError\n\n`GenericOpenAPIError` is a fallback Error which may be returned in some edge cases. This will be deprecated in a later release but remains present for API compatibility.\n\n## Documentation\n\n[Be sure to check out the documentation in the `docs` directory.](docs/)\n\n## Issues\n\nIf you run into problems, [please raise a GitHub issue,](https://github.com/muxinc/mux-go/issues) filling in the issue template. We'll take a look as soon as possible.\n\n## Contributing\n\nPlease do not submit PRs against this package. It is generated from our OpenAPI definitions - [Please open an issue instead!](https://github.com/muxinc/mux-go/issues)\n\n## License\n\n[MIT License.](LICENSE) Copyright 2019 Mux, Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuxinc%2Fmux-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuxinc%2Fmux-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuxinc%2Fmux-go/lists"}