Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.
/ bitcoin-otc Public archive

[Retired] A Ruby library for fetching #bitcoin-otc ratings.

License

Notifications You must be signed in to change notification settings

dryruby/bitcoin-otc

Repository files navigation

#bitcoin-otc Client for Ruby

This is a Ruby library for fetching ratings data from the #bitcoin-otc trading database.

Features

  • Supports checking whether a particular nick is registered.
  • Supports enumerating all registered accounts and their ratings.
  • Supports fetching ratings entries for individual accounts.
  • Compatible with Ruby 1.8.7+, Ruby 1.9.x, and JRuby.

Examples

require 'rubygems'
require 'bitcoin/otc'

Checking whether a nick exists

Bitcoin::OTC::Account.exists?('bendiken')  #=> true
Bitcoin::OTC::Account.exists?('jhacker')   #=> false

Enumerating all accounts

Bitcoin::OTC::Account.each { |account| p account }

Obtaining information about an account

account = Bitcoin::OTC::Account['bendiken']
account.nick            #=> "bendiken"
account.id              #=> 5174
account.keyid           #=> "74D266C6748B3546"
account.fingerprint     #=> "FE0A49F7154638A73DBF0EFD74D266C6748B3546"
account.bitcoinaddress  #=> "1Es4dCurqKxNSqK5W8Adb8WKTbrvKrDdQZ"
account.registered_at   #=> #<DateTime: 2012-10-08T02:43:34+00:00>
account.rating          #=> 7

Enumerating ratings for an account

account = Bitcoin::OTC::Account['bendiken']
account.ratings.each { |rating| p rating }

Dependencies

Author

Donations

If you found this software useful and would like to encourage its maintenance and further development, please consider making a donation to the Bitcoin wallet address 1JAiiZ5FozEHgRAz3XMHYRPxWpZkzHwG5E.

License

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.

Releases

No releases published

Packages

No packages published

Languages