Esempio n. 1
0
 public function testBuild()
 {
     $endpoint = Endpoints::LISTS;
     $uri = MailChimp::API_URI;
     $version = MailChimp::API_VERSION;
     $data_center = 'us1';
     $expected = "https://{$data_center}.{$uri}/{$version}/{$endpoint}";
     $compiled = Endpoints::build($endpoint, $uri, $version, $data_center);
     $this->assertEquals($expected, $compiled);
 }
Esempio n. 2
0
File: Api.php Progetto: behance/kong
 /**
  * Construct and endpoint to hit on the API.
  *
  * @param string $endpoint a constant from \Behance\Kong\Endpoints
  *
  * @return string
  */
 protected function _constructEndpoint($endpoint, $uri, $version)
 {
     return Endpoints::build($endpoint, $uri, $version, $this->getDataCenter());
 }