Beispiel #1
0
 /**
  * Build the URL that will be used to access the API for the respective action
  *
  * @param  string      $location    The location of where to get information from
  * @param  string|null $identifier  The part of the URL that will end with .json. This will either be the resource
  *                                  ID or it will be a row ID prepended with the resource ID
  *
  * @return string The API URL
  */
 private function buildApiUrl($location, $identifier = NULL)
 {
     if ($identifier === NULL) {
         $identifier = $this->resourceId;
     }
     return sprintf("%s://%s/%s/%s.json", UrlQuery::DEFAULT_PROTOCOL, $this->sodaClient->getDomain(), $location, $identifier);
 }
Beispiel #2
0
 public function testDomainWithoutPrefix()
 {
     $sc = new SodaClient($this->domain);
     $this->assertEquals($this->domain, $sc->getDomain());
 }