{"id":20644952,"url":"https://github.com/tickstep/cloudpan189-api","last_synced_at":"2025-04-16T02:09:11.435Z","repository":{"id":43963905,"uuid":"290517685","full_name":"tickstep/cloudpan189-api","owner":"tickstep","description":"cloudpan189 go api","archived":false,"fork":false,"pushed_at":"2023-11-16T02:20:37.000Z","size":82,"stargazers_count":38,"open_issues_count":5,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-16T02:08:48.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tickstep.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-26T14:22:50.000Z","updated_at":"2025-04-12T14:53:42.000Z","dependencies_parsed_at":"2024-06-18T20:08:10.137Z","dependency_job_id":"5f553857-4eaf-4d51-95b0-5665763d69f4","html_url":"https://github.com/tickstep/cloudpan189-api","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/tickstep%2Fcloudpan189-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tickstep%2Fcloudpan189-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tickstep%2Fcloudpan189-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tickstep%2Fcloudpan189-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tickstep","download_url":"https://codeload.github.com/tickstep/cloudpan189-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183105,"owners_count":21226142,"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-11-16T16:18:09.866Z","updated_at":"2025-04-16T02:09:11.406Z","avatar_url":"https://github.com/tickstep.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloudpan189-api\nGO语言封装的 cloud 189 天翼云盘接口API。可以基于该接口库实现对天翼云盘的二次开发。\n\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white\u0026style=flat-square)](https://pkg.go.dev/github.com/tickstep/cloudpan189-api?tab=doc)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/modern-go/concurrent/master/LICENSE)\n\n# 快速使用\n\n导入包\n```\nimport \"github.com/tickstep/cloudpan189-api/cloudpan\"\n```\n\n先调用登录接口，获取APP端cookie和WEB端cookie\n```\n\tappToken, e := cloudpan.AppLogin(\"193xxxxxx@189.cn\", \"123xxxxx\")\n\tif e != nil {\n\t\tfmt.Println(e)\n\t\treturn\n\t}\n\n\twebToken := \u0026cloudpan.WebLoginToken{}\n\twebTokenStr := cloudpan.RefreshCookieToken(appToken.SessionKey)\n\tif webTokenStr != \"\" {\n\t\twebToken.CookieLoginUser = webTokenStr\n\t}\n\tfmt.Println(\"login success\")\n```\n\n使用获取到的cookie创建PanClient实例\n```\n\t// pan client\n\tpanClient := cloudpan.NewPanClient(*webToken, *appToken)\n```\n\n调用PanClient相关方法可以实现对cloud189云盘的相关操作\n```\n\t// do get file info action\n\tfi, err1 := panClient.FileInfoByPath(\"/我的文档\")\n\tif err1 != nil {\n\t\tfmt.Println(\"get file info error\")\n\t\treturn\n\t}\n\tfmt.Printf(\"name = %s, size = %d, path = %s\", fi.FileName, fi.FileSize, fi.Path)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftickstep%2Fcloudpan189-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftickstep%2Fcloudpan189-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftickstep%2Fcloudpan189-api/lists"}