{"id":13509601,"url":"https://github.com/tony612/qiniu","last_synced_at":"2025-03-17T02:31:21.425Z","repository":{"id":29595331,"uuid":"33135328","full_name":"tony612/qiniu","owner":"tony612","description":"[NOT MAINTAINING] Qiniu sdk for Elixir","archived":false,"fork":false,"pushed_at":"2019-12-25T13:17:57.000Z","size":79,"stargazers_count":60,"open_issues_count":0,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-27T16:43:42.424Z","etag":null,"topics":["cdn","elixir","qiniu","sdk"],"latest_commit_sha":null,"homepage":"http://hexdocs.pm/qiniu/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tony612.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-30T16:43:49.000Z","updated_at":"2023-03-01T05:00:23.000Z","dependencies_parsed_at":"2022-09-03T18:20:22.368Z","dependency_job_id":null,"html_url":"https://github.com/tony612/qiniu","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tony612%2Fqiniu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tony612%2Fqiniu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tony612%2Fqiniu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tony612%2Fqiniu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tony612","download_url":"https://codeload.github.com/tony612/qiniu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243837009,"owners_count":20355813,"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":["cdn","elixir","qiniu","sdk"],"created_at":"2024-08-01T02:01:10.179Z","updated_at":"2025-03-17T02:31:21.090Z","avatar_url":"https://github.com/tony612.png","language":"Elixir","funding_links":[],"categories":["Third Party APIs"],"sub_categories":[],"readme":"Qiniu\n=====\n\n[![Build Status](https://travis-ci.org/tony612/qiniu.svg?branch=master)](https://travis-ci.org/tony612/qiniu)\n[![Coverage Status](https://coveralls.io/repos/github/tony612/qiniu/badge.svg?branch=master)](https://coveralls.io/github/tony612/qiniu?branch=master)\n[![Inline docs](http://inch-ci.org/github/tony612/qiniu.svg?branch=master)](http://inch-ci.org/github/tony612/qiniu)\n[![hex.pm version](https://img.shields.io/hexpm/v/qiniu.svg)](https://hex.pm/packages/qiniu)\n\n[Qiniu](http://www.qiniu.com) sdk for Elixir\n\n## Installation and config\n\n* Add qiniu as dependence and application\n\n```elixir\n# mix.exs\ndef application do\n  [applications: [:qiniu]]\nend\n\ndefp deps do\n  [{:qiniu, \"~\u003e 0.3.0\"}]\nend\n```\n\nThen run `$ mix deps.get`\n\n* Config the Qiniu API keys\n\n```elixir\n# config/prod.secret.exs (You'd better not add this file to git)\nconfig :qiniu, Qiniu,\n  access_key: \"key\",\n  secret_key: \"secret\"\n```\n\n## Usage\n\n### Upload\n\nGet the token for uploading\n\n```elixir\npolicy = Qiniu.PutPolicy.build(\"scope\")\nuptoken = Qiniu.Auth.generate_uptoken(policy)\n```\n\nUpload a local file in server\n\n```elixir\nput_policy = Qiniu.PutPolicy.build(\"books\")\nQiniu.Uploader.upload put_policy, \"~/cool.jpg\", key: \"cool.jpg\"\n```\n\nChunked upload\n\n```elixir\nput_policy = Qiniu.PutPolicy.build(\"books\")\nQiniu.ChunkUpload.chunk_upload put_policy, \"~/cool.jpg\", key: \"cool.jpg\"\n```\n\n### Download\n\nGet the authorized download url\n\n```elixir\nQiniu.Auth.authorize_download_url(url, 3600)\n```\n\n### Media Processing\n\nAV transcoding\n\n```elixir\nQiniu.Fop.AV.trans_fops([avthumb: \"mp4\", s: \"640x360\", saveas: \"bucket1:test.mp4\"])\n```\n\n**See the [doc](http://hexdocs.pm/qiniu/) for other features**\n\n### TODO\n\nThere're many small features, implements of which are bothering.\nAnd some of them seem not very useful. So I don't plan to implement all of them\nuntil I find some useful. You can create issues when you need some features\nor just implement them by yourself.\n\n- [x] Uploading\n  - [x] 直传文件（upload）\n  - [x] 创建块（mkblk）\n  - [x] 上传片（bput）\n  - [x] 创建文件（bput）\n- [x] Resource management\n  - [x] 获取资源信息（stat）\n  - [x] 复制资源（copy）\n  - [x] 移动资源（move）\n  - [x] 删除资源（delete）\n  - [x] 批量操作（batch）\n  - [x] 列举资源（list）\n  - [x] 抓取资源（fetch）\n  - [x] 更新镜像资源（prefetch）\n  - [x] 修改元信息（chgm）\n- [ ] Data handling\n  - [ ] Image\n    - [x] 图片基本信息（info）\n    - [x] 图片EXIF信息（exif）\n    - [x] 水印（watermark）\n    - [x] 图片主色调（avg_hue）\n  - [x] 资源下载二维码（qrcode）\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftony612%2Fqiniu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftony612%2Fqiniu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftony612%2Fqiniu/lists"}