Class: WebbyNode::Client

Inherits:
APIObject show all
Defined in:
lib/webbynode-api/data.rb

Overview

Represents the account-holder’s information

Since:

  • 0.0.1

Version:

  • 0.1.0

Instance Attribute Summary

Attributes inherited from APIObject

#data, #email, #token

Instance Method Summary collapse

Methods inherited from APIObject

#auth_get, #auth_post, auth_post, #method_missing

Constructor Details

#initialize(options = {}) ⇒ Client

Fills the @data variable with a hash of information about the client.

Examples:

Get amount of credit left on an account

@client = WebbyNode::Client.new(:email => email, :token)
pp @client.credit # => 1.5

Options Hash (options):

  • :email (String)

    E-mail address used for API access

  • :token (String)

    API token used for API access

Since:

  • 0.0.1



15
16
17
18
# File 'lib/webbynode-api/data.rb', line 15

def initialize(options = {})
  super(options)
  @data = auth_get("/api/xml/client")["hash"]["client"]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class WebbyNode::APIObject