 request = require('superagent')
-
-lobbyPoll = false
-LOBBY_TIMEOUT = 2000
 
 processIdentity = (error, res)->
   # TODO: handle errors

    request.open('GET', "/unidentify/#{identity}", false) #false for synchronous
    request.send(null)

  beginLobbyPoll: ->
    lobbyPoll = true
    ServerAPIBridge.getLobby()

  cancelLobbyPoll: ->
    lobbyPoll = false

  getLobby: ->
    console.log("GETTING LOBBY")
    request.get("/lobby").end(processLobby)

  # TODO: handle errors
  return if error
  AppActionCreators.processLobby(res.body.identities)

ServerAPIBridge =

