Module: SpadeIO::API

Defined in:
lib/spadeio/api.rb

Constant Summary collapse

V1 =
'http://api.spade.io/v1/'
STABLE =
V1
FIND_OUT_MORE =
{
  :key => ['http://spade.io'],
  400 => ['http://docs.spade.io/#errors'],
  500 => ['http://status.spade.io'],
  300 => ['http://status.spade.io']
}
WHAT_HAPPENED =
{
  :key => "An API key was not supplied when initializing a Spade Client",
  400 => 'Unauthorized, forbidden or unacceptable request.',
  500 => 'Server error.',
  300 => 'Network or downtime error.'
}
FIX_WITH =
{
  :key => ["Please make sure to initialize a client\n     Client.new :key => '<your-key>'\n  Before using it."],
  400 => ['Verify that your passing a key to Client.',
          'If you don\'t have a key, sign up at http://spade.io.',
          'Make sure your key is valid, try [email protected] for help.'],
  500 => ['Email [email protected] with the exact error snippet you\'ve got.',
          'Check out http://status.spade.io for known downtime.'],
  300 => ['Try making sure you don\'t have a proxy between you and api.spade.io.',
          'Make sure you can access http://api.spade.io/ping from a browser.']
}