Giter Site home page Giter Site logo

mcsapi_ruby's Introduction

Ruby SDK

为了方便客户使用美团云服务,我们提供了方便调用MOS API的Ruby SDK,用户可以通过调用Ruby SDK在自己的程序中实现对美团云资源的控制。

安装

使用gem安装

在命令行下可以直接使用gem进行安装:

sudo gem install mos-sdk

从源码安装

如果使用bundler,您需要在Gemfile中添加以下内容:

gem 'mos-sdk', :git => 'https://github.com/meituan/mcsapi_ruby.git'

执行下述命令安装:

bundle install

访问MOS控制台的 API页面 获得API入口URL、ACCESS Key和Secret。

使用Ruby SDK

通过MOS::Client生成客户端实例,API接口说明实现参见 Ruby SDK API doc文档

示例代码如下:

require "mos-sdk"

key = 'MOS_ACCESS_KEY'
secret = 'MOS_ACCESS_SECRET'
url = 'MOS_ACCESS_URL'

cli = MOS::Client(key, secret, url)

balance = cli.get_balance()
puts balance

mcsapi_ruby's People

Contributors

meituancrm avatar xfgong avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.