     headers["user-agent"] = agent if agent
     @_proxy "POST", "user/signup", parameters, headers
 
-
   login: (parameters, agent) ->
     headers = Authorization: "basic #{@key}"
     headers["user-agent"] = agent if agent
     @_proxy "POST", "user/login", parameters, headers
-
 
   refreshToken: (agent, refresh_token) ->
     headers = Authorization: "basic #{@key}"

###
"use strict"

request = require "request"
qs      = require "querystring"
Hope    = require "hope"

Appnima =

  host    : "http://api.appnima.com/"
  key     : ""

  open: (connection) ->
    promise = new Hope.Promise()
    if connection.key? then @key = connection.key
    if connection.host? then @host = connection.host
    console.log " ✓".green, "Appnima", "listening at".grey, "#{@host}".underline.blue
    promise.done null, true
    promise

      grant_type    : "refresh_token"
    @_proxy "POST", "user/token", parameters, headers

  api: (agent, method, url, token, parameters) ->
    headers = {}
    headers["user-agent"] = agent if agent
