           cb { error_info: "Sorry, #{project} not found." }
 
 
+  # --------------- NEW withProject
   getProject: (project) ->
     return new Promise (res, err) =>
       project = project.toLowerCase()

      return false
    true


  phabGet: (query, endpoint, cb) =>
    query['api.token'] = process.env.PHABRICATOR_API_KEY
    # console.log query

          .catch (e) ->
            err e

  # --------------- NEW from withProject
  projectQuery: (project_name) ->
    return new Promise (res, err) =>
      query = { 'names[0]': project_name }
      @request(query, 'project.query')
        .then (body) ->
          data = body.result.data
          if data.length > 0 or Object.keys(data).length > 0
            phid = Object.keys(data)[0]
            name = data[phid].name
            res { name: name, phid: phid }
          else
            err "Sorry, #{project_name} not found."
        .catch (e) ->
          err e


  # user can be an object with an id and name fields
