           }
         cb json_body
 
+  # --------------- NEW phabGet
+  request: (query, endpoint) ->
+    return new Promise (res, err) =>
+      query['api.token'] = process.env.PHABRICATOR_API_KEY
+      # console.log query
+      body = querystring.stringify(query)
+      @robot.http(process.env.PHABRICATOR_URL)
+        .path("api/#{endpoint}")
+        .get(body) (error, result, payload) ->
+          if result?
+            switch result.statusCode
+              when 200
+                if result.headers['content-type'] is 'application/json'
+                  res JSON.parse(payload)
+                else
+                  err 'api did not deliver json'
+              else
+                err "http error #{result.statusCode}"
+          else
+            err "#{error.code} #{error.message}"
+
+
   isBlacklisted: (id) ->
     @data.blacklist.indexOf(id) > -1
 

          cb { error_info: "Sorry, #{project} not found." }


  getProject: (project) ->
    return new Promise (res, err) =>
      project = project.toLowerCase()

    else
      cb { rooms: [ ] }

  # --------------- OLD
  withProject: (project, cb) =>
    project = project.toLowerCase()
    if @data.projects[project]?
