/** * @param string $streamUrl * @param EntryEmbedMode $embedMode * @return StreamFeed * @throws Exception\StreamDeletedException * @throws Exception\StreamNotFoundException */ private function readStreamFeed($streamUrl, EntryEmbedMode $embedMode = null) { $request = $this->getJsonRequest($streamUrl); if ($embedMode != null && $embedMode != EntryEmbedMode::NONE()) { $uri = Uri::withQueryValue($request->getUri(), 'embed', $embedMode->toNative()); $request = $request->withUri($uri); } $this->sendRequest($request); $this->ensureStatusCodeIsGood($streamUrl); return new StreamFeed($this->lastResponseAsJson(), $embedMode); }
/** * @return array */ public static function modeProvider() { return [[null, EntryEmbedMode::NONE()], [$eem = EntryEmbedMode::NONE(), $eem], [$eem = EntryEmbedMode::RICH(), $eem], [$eem = EntryEmbedMode::BODY(), $eem]]; }