예제 #1
0
 public function testProjectsCopy()
 {
     $resource = "Projects";
     $action = "copy";
     $items = ["PROJECT-ID" => "xyz123"];
     $this->assertEquals("https://api.wistia.com/v1/projects/xyz123/copy.json", \Wistia\Resources\UriFactory::getUri($resource, $action, $items));
 }
예제 #2
0
 public function testMediasStats()
 {
     $resource = "Medias";
     $action = "stats";
     $items = ["MEDIA-ID" => "xyz123"];
     $this->assertEquals("https://api.wistia.com/v1/medias/xyz123/stats.json", \Wistia\Resources\UriFactory::getUri($resource, $action, $items));
 }
예제 #3
0
 public function testSharingsDelete()
 {
     $resource = "Sharings";
     $action = "delete";
     $items = ["PROJECT-ID" => "xyz123", "SHARING-ID" => "abc789"];
     $this->assertEquals("https://api.wistia.com/v1/projects/xyz123/sharings/abc789.json", \Wistia\Resources\UriFactory::getUri($resource, $action, $items));
 }
예제 #4
0
 public function testCaptionsPurchase()
 {
     $resource = "Captions";
     $action = "purchase";
     $items = ["MEDIA-ID" => "xyz123"];
     $this->assertEquals("https://api.wistia.com/v1/medias/xyz123/captions/purchase.json", \Wistia\Resources\UriFactory::getUri($resource, $action, $items));
 }
예제 #5
0
 public function testCustomizationsDelete()
 {
     $resource = "Customizations";
     $action = "delete";
     $items = ["MEDIA-ID" => "xyz123"];
     $this->assertEquals("https://api.wistia.com/v1/medias/xyz123/customizations.json", \Wistia\Resources\UriFactory::getUri($resource, $action, $items));
 }
예제 #6
0
 /**
  *   Delete Project Sharings
  *
  *   @param $project_id - wistia project id
  *   @param $sharing_id - wistia id of a specific sharing object
  *   @param $params - other parameters
  */
 public function delete($project_id, $sharing_id, array $params = array())
 {
     $uri = \Wistia\Resources\UriFactory::getUri(self::RESOURCE_NAME, "delete", ["PROJECT-ID" => $project_id, "SHARING-ID" => $sharing_id]);
     return $this->curl->delete($uri, $params);
 }
예제 #7
0
 /**
  *   Stats Medias
  *
  *   @param $media_id - wistia media id
  *   @param $params - api parameters see Wistia API
  */
 public function stats($media_id, array $params = array())
 {
     $uri = \Wistia\Resources\UriFactory::getUri(self::RESOURCE_NAME, "stats", ["MEDIA-ID" => $media_id]);
     return $this->curl->get($uri, $params);
 }
예제 #8
0
 /**
  *   Copy Project
  *
  *   @param $project_id - id of wistia project to copy
  *   @param $params - parameters to pass to wistia
  *   @return wistia output object
  */
 public function copy($project_id, array $params = array())
 {
     $uri = \Wistia\Resources\UriFactory::getUri(self::RESOURCE_NAME, "copy", ["PROJECT-ID" => $project_id]);
     return $this->curl->post($uri, $params);
 }
예제 #9
0
 /**
  *   Delete Customizations
  *
  *   @param $media_id - wistia media id
  *   @param $params - api parameters see Wistia API
  */
 public function delete($media_id, array $params = array())
 {
     $uri = \Wistia\Resources\UriFactory::getUri(self::RESOURCE_NAME, "delete", ["MEDIA-ID" => $media_id]);
     return $this->curl->delete($uri);
 }
예제 #10
0
 /**
  *   Get Account
  *
  *   @param $params - listing parameters see Wistia API
  */
 public function get(array $params = array())
 {
     $uri = \Wistia\Resources\UriFactory::getUri(self::RESOURCE_NAME, "get");
     return $this->curl->get($uri, $params);
 }
예제 #11
0
 public function testAccountGet()
 {
     $resource = "Account";
     $action = "get";
     $this->assertEquals("https://api.wistia.com/v1/account.json", \Wistia\Resources\UriFactory::getUri($resource, $action));
 }