public function testBootstrap() { $bootstrapUrlSsl = "https://" . $this->network->getNetworkName() . ".bootstrap.fyre.co"; $this->assertEquals($bootstrapUrlSsl, Domain::bootstrap($this->network)); $this->assertEquals($bootstrapUrlSsl, Domain::bootstrap($this->site)); $this->assertEquals($bootstrapUrlSsl, Domain::bootstrap($this->collection)); $this->network->setSsl(false); $bootstrapUrl = "http://bootstrap." . $this->network->getNetworkName() . ".fyre.co"; $this->assertEquals($bootstrapUrl, Domain::bootstrap($this->network)); $this->assertEquals($bootstrapUrl, Domain::bootstrap($this->site)); $this->assertEquals($bootstrapUrl, Domain::bootstrap($this->collection)); }
public function getCollectionContent() { $url = sprintf("%s/bs3/%s/%s/%s/init", Domain::bootstrap($this), $this->getSite()->getNetwork()->getData()->getName(), $this->getSite()->getData()->getId(), base64_encode($this->getData()->getArticleId())); $response = Client::GET($url); return json_decode($response); }
private static function getTimelineUrl($core) { return sprintf(self::STREAM_URL, Domain::bootstrap($core)) . self::TIMELINE_PATH; }
public function getCollectionContent($articleId) { $url = sprintf("%s/bs3/%s/%s/%s/init", Domain::bootstrap($this), $this->_network->getName(), $this->_id, base64_encode($articleId)); $response = Client::GET($url); return json_decode($response->body); }