Coder Social home page Coder Social logo

elliotcui / openapi-core-ruby-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aliyun/openapi-core-ruby-sdk

0.0 1.0 0.0 53 KB

Alibaba Cloud Core SDK for Ruby

Home Page: https://rubygems.org/gems/aliyunsdkcore?locale=en

License: MIT License

Ruby 98.76% Makefile 1.24%

openapi-core-ruby-sdk's Introduction

English | 简体中文

Alibaba Cloud Core SDK for Ruby

Gem Version Build Status Build status codecov

Alibaba Cloud Core SDK for Ruby allows you to access Alibaba Cloud services such as Elastic Compute Service (ECS), Server Load Balancer (SLB), and CloudMonitor. You can access Alibaba Cloud services without the need to handle API related tasks, such as signing and constructing your requests.

This document introduces how to install and use Alibaba Cloud Core SDK for Ruby.

Installation

$ gem install aliyunsdkcore

Usage

The RPC demo:

require 'aliyunsdkcore'

client = RPCClient.new(
  endpoint:          'https://ecs.aliyuncs.com',
  api_version:       '2014-05-26',
  access_key_id:     ENV['ACCESS_KEY_ID'],
  access_key_secret: ENV['ACCESS_KEY_SECRET'],
)

params         = { key: (1..11).to_a.map(&:to_s) }
request_option = { method: 'POST', timeout: 15000 }
response       = client.request(
  action: 'DescribeRegions',
  params: params,
  opts: request_option
)

print response

The ROA demo:

require 'aliyunsdkcore'

client = ROAClient.new(
  endpoint:          'http://ros.aliyuncs.com',
  api_version:       '2015-09-01',
  access_key_id:     ENV['ACCESS_KEY_ID'],
  access_key_secret: ENV['ACCESS_KEY_SECRET'],
)

response = client.request(
  method: 'GET',
  uri: '/regions',
  options: {
    timeout: 15000
  }
)

print response.body

Issues

Opening an Issue, Issues not conforming to the guidelines may be closed immediately.

Changelog

Detailed changes for each release are documented in the release notes.

Contribution

Please make sure to read the Contributing Guide before making a pull request.

License

MIT

Copyright 1999-2019 Alibaba Group Holding Ltd.

openapi-core-ruby-sdk's People

Contributors

aliguyong avatar axiosleo avatar elliotcui avatar jacksontian avatar jiangyongkang avatar zhandao avatar

Watchers

 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.