{"id":15573275,"url":"https://github.com/silentsokolov/go-vimeo","last_synced_at":"2025-08-20T15:22:38.882Z","repository":{"id":48511356,"uuid":"69806552","full_name":"silentsokolov/go-vimeo","owner":"silentsokolov","description":"Vimeo Go API client","archived":false,"fork":false,"pushed_at":"2024-04-04T05:38:24.000Z","size":155,"stargazers_count":28,"open_issues_count":2,"forks_count":18,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-24T02:08:18.212Z","etag":null,"topics":["api-client","go","golang","vimeo"],"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/silentsokolov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2016-10-02T15:59:14.000Z","updated_at":"2025-04-12T05:30:02.000Z","dependencies_parsed_at":"2024-06-18T17:01:49.049Z","dependency_job_id":"2846e71b-5b43-4642-b33c-63f58f8fb567","html_url":"https://github.com/silentsokolov/go-vimeo","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silentsokolov%2Fgo-vimeo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silentsokolov%2Fgo-vimeo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silentsokolov%2Fgo-vimeo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silentsokolov%2Fgo-vimeo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silentsokolov","download_url":"https://codeload.github.com/silentsokolov/go-vimeo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250546081,"owners_count":21448260,"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":["api-client","go","golang","vimeo"],"created_at":"2024-10-02T18:11:38.371Z","updated_at":"2025-04-24T02:08:25.368Z","avatar_url":"https://github.com/silentsokolov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build](https://github.com/silentsokolov/go-vimeo/actions/workflows/build.yaml/badge.svg)](https://github.com/silentsokolov/go-vimeo/actions/workflows/build.yaml)\n[![GoDoc](https://godoc.org/github.com/silentsokolov/go-vimeo/v2?status.svg)](https://godoc.org/github.com/silentsokolov/go-vimeo/v2/vimeo) [![codecov](https://codecov.io/gh/silentsokolov/go-vimeo/branch/master/graph/badge.svg)](https://codecov.io/gh/silentsokolov/go-vimeo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/silentsokolov/go-vimeo/v2)](https://goreportcard.com/report/github.com/silentsokolov/go-vimeo/v2)\n\n# go-vimeo\n\ngo-vimeo is a Go client library for accessing the [Vimeo API](https://developer.vimeo.com/api).\n\n## Basic usage ##\n\n```go\nimport \"github.com/silentsokolov/go-vimeo/v2/vimeo\"\n\n\nfunc main() {\n\tclient := vimeo.NewClient(tokenContext, nil)\n\n\t// Specific optional parameters\n\tcats, _, err := client.Categories.List(OptPage(1), OptPerPage(2), OptFields([]string{\"name\"}))\n}\n```\n\n### Authentication ###\n\nThe go-vimeo library does not directly handle authentication. Instead, when creating a new client, pass an http.Client that can handle authentication for you, for example the [oauth2](https://github.com/golang/oauth2).\n\n```go\nimport (\n\t\"golang.org/x/oauth2\"\n\t\"github.com/silentsokolov/go-vimeo/v2/vimeo\"\n)\n\nfunc main() {\n\tts := oauth2.StaticTokenSource(\n\t\t\u0026oauth2.Token{AccessToken: \"... your access token ...\"},\n\t)\n\ttc := oauth2.NewClient(oauth2.NoContext, ts)\n\n\tclient := vimeo.NewClient(tc, nil)\n\n\tcats, _, err := client.Categories.List()\n}\n```\n\n\n### Pagination ###\n\n```go\nfunc main() {\n\tclient := ...\n\n\t// Any \"List\" request\n\t_, resp, _ := client.Categories.List(OptPage(2), OptPerPage(2))\n\n\tfmt.Printf(\"Current page: %d\\n\", resp.Page)\n\tfmt.Printf(\"Next page: %s\\n\", resp.NextPage)\n\tfmt.Printf(\"Prev page: %s\\n\", resp.PrevPage)\n\tfmt.Printf(\"Total objects: %d\\n\", resp.Total)\n}\n```\n\n\n### Created/Updated request ###\n\n```go\nfunc main() {\n\tclient := ...\n\n\t// Specific request instance\n\treq := \u0026vimeo.ChannelRequest{\n\t\tName:        \"My Channel\",\n\t\tDescription: \"Awesome\",\n\t\tPrivacy:     \"anybody\",\n\t}\n\n\tch, _, _ := client.Channels.Create(req)\n\n\tfmt.Println(ch)\n}\n```\n\n\n### Where \"Me\" service? ###\n\nThe \"Me\" service repeats the \"Users\" service, passing the empty string will authenticated user.\n\n```go\nfunc main() {\n\tclient := ...\n\n\t// Call /me API method.\n\t// Return current authenticated user.\n\tme, _, _ := client.Users.Get(\"\")\n\n\tfmt.Println(me)\n\n\n\t// Call /me/videos API method.\n\t// Return videos for current authenticated user.\n\tvideos, _, _ := client.Users.ListVideo(\"\")\n\n\tfmt.Println(videos)\n}\n```\n\n### Upload video ###\n\nSince the release of Vimeo API version 3.4 used to unload the video the [tus protocol](https://tus.io/). Necessary to implement the process manually. You can use the implementation of [tus protocol on golang](https://github.com/eventials/go-tus).\n\n```go\nimport (\n\t\"os\"\n\n\t\"golang.org/x/oauth2\"\n\t\"github.com/silentsokolov/go-vimeo/v2/vimeo\"\n\n\ttus \"github.com/eventials/go-tus\"\n)\n\ntype Uploader struct{}\n\nfunc (u Uploader) UploadFromFile(c *vimeo.Client, uploadURL string, f *os.File) error {\n\ttusClient, err := tus.NewClient(uploadURL, nil)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tupload, err := tus.NewUploadFromFile(f)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tuploader := tus.NewUploader(tusClient, uploadURL, upload, 0)\n\n\treturn uploader.Upload()\n}\n\nfunc main() {\n\tconfig := vimeo.Config{\n\t\tUploader: \u0026Uploader{},\n\t}\n\n\ttc := ...\n\tclient := vimeo.NewClient(tc, \u0026config)\n\n\tfilePath := \"/Users/user/Videos/Awesome.mp4\"\n\n\tf, _ := os.Open(filePath)\n\n\tvideo, resp, _ := client.Users.UploadVideo(\"\", f)\n\n\tfmt.Println(video, resp)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilentsokolov%2Fgo-vimeo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilentsokolov%2Fgo-vimeo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilentsokolov%2Fgo-vimeo/lists"}