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)); }
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)); }
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)); }
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)); }
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)); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
public function testAccountGet() { $resource = "Account"; $action = "get"; $this->assertEquals("https://api.wistia.com/v1/account.json", \Wistia\Resources\UriFactory::getUri($resource, $action)); }