Project

mobiusrb

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Mobius Ruby API Client
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 3.0.0
 Project Readme

Mobius Ruby API Client

Gem Version MIT licensed

The Mobius Ruby Client provides simple access to the Mobius API for applications written on Ruby

Installation

Install it yourself as:

$ gem install mobiusrb

Or add this line to your application's Gemfile:

gem 'mobiusrb'

Usage

For importing library use:

require 'mobiusrb'

The library need to be configured with your API secret key which you can create in Mobius DApp Store

mobius = Mobius.new(api_key: 'your_api_key')

Examples

Every method returns a chainable promise which can be used like this:

data = mobius.app_store.balance(app_uid: 'f9e5e943', email: 'mail@example.com')

if data['num_credits'] > 0
  mobius.app_store.use(app_uid: 'f9e5e943', email: 'mail@example.com', num_credits: 1)
end

Methods

  • mobius.app_store.balance(app_uid:, email:)

    Get balance of credits for email.

  • mobius.app_store.use(app_uid:, email:, num_credits:)

    Use numCredits from user with email.

  • mobius.tokens.register(token_type:, name:, symbol:, address:)

    Register a token.

  • mobius.tokens.balance(token_uid:, address:)

    Query the number of tokens specified by the token.

  • mobius.tokens.create_address(token_uid:, managed:)

    Create an address for the token.

  • mobius.tokens.register_address(token_uid:, address:)

    Register an address for the token.

  • mobius.tokens.transfer_managed(token_address_uid:, address_to:, num_tokens:)

    Transfer tokens from a Mobius managed address to a specified address.

  • mobius.tokens.transfer_info(token_address_transfer_uid:)

    Get the status and transaction hash of a Mobius managed token transfer.

More information

See the REST API docs