api-v1-client-ruby:区块链比特币开发人员API-Ruby

  • o7_286001
    了解作者
  • 24.5KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-29 06:11
    上传日期
区块链API库(Ruby,v1) 与Blockchain.info API进行交互的官方Ruby宝石。 发行说明 该gem最近已更新,以支持Blockchain API的其他功能。 作为此过程的一部分,架构已更改。 应用程序现在可以创建支持不同Blockchain API端点的不同类的实例,而不必在Blockchain模块下调用静态方法。 调用静态方法仍然可以使用,但已弃用了这些方法。 入门 通过RubyGems安装: $ gem install blockchain 手动安装: $ git clone https://github.com/blockchain/api-v1-client-ruby $ cd api-v1-client-ruby $ rake install 要使用wallet和createwallet功能,您还需要一个实例。 该gem包含以下功能: block
api-v1-client-ruby-master.zip
  • api-v1-client-ruby-master
  • .gitignore
    573B
  • README.md
    3.1KB
  • test
  • test_exchangerates.rb
    1.1KB
  • test_block.rb
    4.4KB
  • test_wallet.rb
    2KB
  • test_statistics.rb
    1.3KB
  • test_pushtx.rb
    280B
  • Gemfile
    95B
  • docs
  • receive.md
    1.3KB
  • exchangerates.md
    1.2KB
  • statistics.md
    1.7KB
  • wallet.md
    3.1KB
  • pushtx.md
    966B
  • createwallet.md
    1.1KB
  • blockexplorer.md
    6.1KB
  • blockchain.gemspec
    917B
  • LICENSE.txt
    1.1KB
  • lib
  • blockchain.rb
    317B
  • blockchain
  • pushtx.rb
    675B
  • client.rb
    1.9KB
  • statistics.rb
    3.9KB
  • blockexplorer.rb
    11.7KB
  • createwallet.rb
    1.5KB
  • receive.rb
    2.8KB
  • version.rb
    42B
  • wallet.rb
    4.3KB
  • exchangerates.rb
    2KB
  • Rakefile
    146B
内容介绍
# Blockchain API library (Ruby, v1) An official Ruby gem for interacting with the Blockchain.info API. ### Release notes This gem was recently updated to support additional functionality of the Blockchain API. As part of this process, the archticture was changed. Rather than calling static methods under the Blockchain module, applications can now create instances of different classes supporting different Blockchain API endpoints. Calling the static methods will still work, but these have been deprecated. ### Getting started Installation via RubyGems: ``` $ gem install blockchain ``` Manual installation: ``` $ git clone https://github.com/blockchain/api-v1-client-ruby $ cd api-v1-client-ruby $ rake install ``` To use the `wallet` and `createwallet` functionality, you'll also need an instance of [service-my-wallet][my-wallet]. The gem consists of the following functionality: * `blockexplorer` ([docs](docs/blockexplorer.md)) ([api/blockchain_api][api1]) * `createwallet` ([docs](docs/createwallet.md)) ([api/create_wallet][api2]) * `exchangerates` ([docs](docs/exchangerates.md)) ([api/exchange\_rates\_api][api3]) * `pushtx` ([docs](docs/pushtx.md)) ([pushtx][api7]) * `receive` ([docs](docs/receive.md)) ([api/api_receive][api4]) * `statistics` ([docs](docs/statistics.md)) ([api/charts_api][api5]) * `wallet` ([docs](docs/wallet.md)) ([api/blockchain\_wallet\_api][api6]) The main module is called `Blockchain` ### The Client class Every class instance creates an instance of the client class, which is used to make calls to the API. The client instance will be created with a default base url if none is provided. You can also provide an API code when creating an instance of any class. For example: ```ruby require 'Blockchain' # creates a block explorer instance pointing to the default base url, https://blockchain.info/, with no api code explorer = Blockchain::BlockExplorer.new # creates a block explorer pointing to an alternative base url and using an api code explorer = Blockchain::BlockExplorer.new('http://some-other-url.com/', 'api-code') ``` ### Error handling All functions may raise exceptions caused by incorrectly passed parameters or other problems. If a call is rejected server-side, the `APIException` exception will be raised. ### Connection timeouts It is possible to set arbitrary connection timeouts. ```ruby require 'Blockchain' Blockchain::TIMEOUT_SECONDS = 5 #time out after 5 seconds ``` ### Request limits and API keys In order to prevent abuse some API methods require an API key approved with some basic contact information and a description of its intended use. Please request an API key [here](https://blockchain.info/api/api_create_code). The same API key can be used to bypass the request limiter. [my-wallet]: https://github.com/blockchain/service-my-wallet-v3 [api1]: https://blockchain.info/api/blockchain_api [api2]: https://blockchain.info/api/create_wallet [api3]: https://blockchain.info/api/exchange_rates_api [api4]: https://blockchain.info/api/api_receive [api5]: https://blockchain.info/api/charts_api [api6]: https://blockchain.info/api/blockchain_wallet_api [api7]: https://blockchain.info/pushtx
评论
    相关推荐
    • ruby-ffi-czmq:ruby https的ffi包装器
      Ruby-ffi-czmq 此回购作为如何为czmq编写包装的一个不好的例子,不建议完全使用它。
    • openpayu_ruby
      OpenPayU Ruby 自2014年12月19日起,我们将停止开发和支持openpayu_ruby插件。 不过,随时创建拉取请求,我们将很乐意接受。 OpenPayU Ruby库提供对PayU Gateway API版本的集成访问。 2。 安装 将此行添加到您的...
    • ruby logger
      NULL 博文链接:https://liltos.iteye.com/blog/414883
    • contracthashtool-ruby:httpsRuby 端口
      contracthashtool-ruby Ruby 端口: : 另见附录 A: : 安装 将此行添加到应用程序的 Gemfile 中: gem 'contracthashtool' 然后执行: $ bundle 或者自己安装: $ gem install contracthashtool 用法 ...
    • Ruby学习笔记
      书籍。 博文链接:https://ivaneye.iteye.com/blog/229039
    • Ruby 基础
      初学文档 博文链接:https://beyondsanli.iteye.com/blog/193033
    • ruby语法
      NULL 博文链接:https://ice-cream.iteye.com/blog/512580
    • ruby 书籍1
      NULL 博文链接:https://eroshn.iteye.com/blog/836972
    • Ruby Mind Map
      ruby mind v0.8 博文链接:https://sharkmao.iteye.com/blog/46951
    • tutorialRuby:教程Ruby https
      自述文件 该自述文件通常会记录启动和运行应用程序所需的所有步骤。... Ruby版本 系统依赖 配置 数据库创建 数据库初始化 如何运行测试套件 服务(作业队列,缓存服务器,搜索引擎等) 部署说明 ...