Code Monkey home page Code Monkey logo

qcloud-cos-sdk's Introduction

Qcloud COS

It's the full featured Ruby SDK for Qcloud COS(Cloud Object Service).

We keep API simple but powerful, to give you more freedom.

Enjoy it!

Installation

Add this line to your application's Gemfile:

gem 'qcloud_cos'

And then execute:

$ bundle

Or install it yourself as:

$ gem install qcloud_cos

Usage

QcloudCos.configure do |config|
  config.app_id = 'app-id'
  config.secret_id = 'secret_id'
  config.secret_key = 'secret_key'
  config.endpoint = "http://web.file.myqcloud.com/files/v1/"
  config.bucket = "default-bucket-name"
end

QcloudCos.list # 列出 / 目录下的文件和文件夹

QcloudCos.upload('/test.log', 'Hello World')
QcloudCos.upload('/test.log', File.new('path/to/log'))

QcloudCos.upload_slice('/video.mp4', 'path/to/video.mp4')

QcloudCos.create_folder('/test/') # 创建目录

CLI

$ qcloud-cos config

$ qcloud-cos info
$ qcloud-cos list

More Example and Scenario, visit our Document

Document

Here is original Restful API, It has the most detailed and authoritative explanation for every API.

Here is our RDoc Document, It's well format to help you find more detail about methods.

Here are some more guides for help you. Welcome to advice.

Test

We use minitest for test and rubocop for Syntax checker, If you want to make contribute to this library. Confirm below Command is success:

bundle exec rake test

Authors && Contributors

License

licensed under the Apache License 2.0

qcloud-cos-sdk's People

Contributors

zlx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.