class HabiticaClient::Client

This wraps up httparty functionality in a habitrpg specific class.

Not intented to be accessed directly.

Public Class Methods

new(user_id, api_token) click to toggle source
# File lib/habitica_client/client.rb, line 16
def initialize(user_id, api_token)
  @user_id = user_id
  @api_token = api_token

  self.class.headers('User-Agent' => 'habitapi-rpg',
                     'Content-Type' => 'application/json',
                     'x-api-key' => @api_token,
                     'x-api-user' => @user_id)
end