/**
  * @param string    $state
  * @param null|bool $include_archived `null` ignores this argument, `true` or `false` filters by this argument
  *
  * @return mixed
  */
 private function get_jobs($state = 'any', $include_archived = null)
 {
     $batch = TranslationProxy_Basket::get_batch_data();
     $params = array('project_id' => $this->id, 'accesskey' => $this->access_key, 'state' => $state);
     if (null !== $include_archived) {
         $params['archived'] = $include_archived;
     }
     if ($batch) {
         $params['batch_id'] = $batch ? $batch->id : false;
         return TranslationProxy_Api::proxy_request('/batches/{batch_id}/jobs.json', $params);
     } else {
         //FIXME: remove this once TP will accept the TP Project ID: https://icanlocalize.basecamphq.com/projects/11113143-translation-proxy/todo_items/182251206/comments
         $params['project_id'] = $this->id;
     }
     try {
         return TranslationProxy_Api::proxy_request('/jobs.json', $params);
     } catch (Exception $ex) {
         $this->add_error($ex->getMessage());
         return false;
     }
 }
 /**
  * @param string $state
  *
  * @return mixed
  */
 private function get_jobs($state = 'any')
 {
     $batch = TranslationProxy_Basket::get_batch_data();
     $params = array('project_id' => $this->id, 'accesskey' => $this->access_key, 'state' => $state);
     if ($batch) {
         $params['batch_id'] = $batch ? $batch->id : false;
         return TranslationProxy_Api::proxy_request('/batches/{batch_id}/jobs.json', $params);
     } else {
         //FIXME: remove this once TP will accept the TP Project ID: https://icanlocalize.basecamphq.com/projects/11113143-translation-proxy/todo_items/182251206/comments
         $params['project_id'] = $this->id;
     }
     return TranslationProxy_Api::proxy_request('/jobs.json', $params);
 }