Ejemplo n.º 1
0
 /**
  *
  * @param Bridge_Element $element
  *
  * @return Array
  */
 public function get_element_status(Bridge_Element $element)
 {
     $url = sprintf("/%s/%s", $element->get_type(), $element->get_dist_id());
     $result = $this->_api->call($url, ['fields' => ['status']], $this->oauth_token);
     return $result["status"];
 }
Ejemplo n.º 2
0
 public function get_element_status(Bridge_Element $element)
 {
     try {
         $ticket = $this->checkTicket($element->get_dist_id(), $element->get_type());
         if ($ticket["status"] == self::UPLOAD_STATE_DONE) {
             $this->get_element_from_id($ticket["dist_id"], $element->get_type());
             $element->set_dist_id($ticket["dist_id"]);
         }
     } catch (\Exception $e) {
         return self::UPLOAD_STATE_FAILED;
     }
     return $ticket["status"];
 }