Get a playback's details.

@param string $playbackId Playback's id
@return Playback
@throws NotFoundException
767414
public function getPlayback($playbackId)
    {
        $uri = "playbacks/$playbackId";
        try {
            $response = $this->client->getEndpoint()->get($uri);
        } catch (RequestException $e) {
            $this->processRequestException($e);
        }

        return new Playback($this->client, \GuzzleHttp\json_decode($response->getBody()));
    }
862326
public function getRecord($id, $versionID = null)
    {
        if (!$id) {
            return null;
        }
        $treeClass = $this->config()->get('tree_class');
        if ($id instanceof $treeClass) {
            return $id;
        }
        if (substr($id, 0, 3) == 'new') {
            return $this->getNewItem($id);
        }
        if (!is_numeric($id)) {
            return null;
        }

        $currentStage = Versioned::get_reading_mode();

        if ($this->getRequest()->getVar('Version')) {
            $versionID = (int) $this->getRequest()->getVar('Version');
        }

        /** @var SiteTree $record */
        if ($versionID) {
            $record = Versioned::get_version($treeClass, $id, $versionID);
        } else {
            $record = DataObject::get_by_id($treeClass, $id);
        }

        // Then, try getting a record from the live site
        if (!$record) {
            // $record = Versioned::get_one_by_stage($treeClass, "Live", "\"$treeClass\".\"ID\" = $id");
            Versioned::set_stage(Versioned::LIVE);
            singleton($treeClass)->flushCache();

            $record = DataObject::get_by_id($treeClass, $id);
        }

        // Then, try getting a deleted record
        if (!$record) {
            $record = Versioned::get_latest_version($treeClass, $id);
        }

        // Set the reading mode back to what it was.
        Versioned::set_reading_mode($currentStage);

        return $record;
    }
253292
public function getById(PaymentId $paymentId) : Payment
    {
        if (!array_key_exists((string)$paymentId, $this->payments)) {
            throw PaymentNotFoundException::byId($paymentId);
        }

        return $this->payments[(string)$paymentId];
    }
941034
public function playback(Request $request)
    {
        foreach ($this->storage as $recording) {
            $storedRequest = Request::fromArray($recording['request']);
            if ($storedRequest->matches($request, $this->getRequestMatchers())) {
                return Response::fromArray($recording['response']);
            }
        }

        return null;
    }
984669
public boolean stream(int bufferId) {
		int frames = sectionSize;
		boolean reset = false;
		boolean more = true;
		
		if (frames > songDuration) {
			frames = songDuration;
			reset = true;
		}
		
		ibxm.get_audio(data, frames);
		bufferData.clear();
		bufferData.put(data);
		bufferData.limit(frames * 4);
		
		if (reset) {
			if (loop) {
				ibxm.seek(0); 
				ibxm.set_module(module);
				songDuration = ibxm.calculate_song_duration();
			} else {
				more = false;
				songDuration -= frames;
			}
		} else {
			songDuration -= frames;
		}

		bufferData.flip();
		AL10.alBufferData(bufferId, AL10.AL_FORMAT_STEREO16, bufferData, 48000);
		
		return more;
	}
716224
public function getSubscriptionById($subscriptionId)
    {
        $subscriptions = $this
            ->getSubscriptions(null, null, null, $subscriptionId)
            ->getResponse()
            ->getSubscriptions();

        return count($subscriptions) ? reset($subscriptions) : null;
    }
1215129
public function getVideo(string $videoId): Video
	{
		return $this->parseData($this->getData($videoId), $videoId);
	}
42780
public function getCaptureDetails ($amazonCaptureId)
    {
        $captureDetailsRequest = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest();
        $captureDetailsRequest->setSellerId($this->_sellerId);
        $captureDetailsRequest->setAmazonCaptureId($amazonCaptureId);
        
        return $this->_service->getCaptureDetails($captureDetailsRequest);
    }
1144655
public function viewAction($id)
    {
        $gallery = $this->get('sonata.media.manager.gallery')->findOneBy([
            'id' => $id,
            'enabled' => true,
        ]);

        if (!$gallery) {
            throw new NotFoundHttpException('unable to find the gallery with the id');
        }

        return $this->render('@SonataMedia/Gallery/view.html.twig', [
            'gallery' => $gallery,
        ]);
    }
333975
public function EventDetail($eventId)
    {
        $request = new Request();

        if (null == $eventId) {
            throw new InvalidArgumentException('eventId');
        }

        return $this->doRequest('Event/Detail', $request, array('Id' => $eventId))->getContentJson();
    }
564916
private function getInput($fileId)
    {
        $volumeManager = $this->getContainer()->get('phlexible_media_manager.volume_manager');
        $volume = $volumeManager->getByFileId($fileId);
        $file = $volume->findFile($fileId);

        return InputDescriptor::fromFile($file);
    }
262764
public function read($sessionId): string
    {
        $sql = 'SELECT content FROM sessions WHERE id = :id';
        $params = ['id' => $sessionId];

        return (string) $this->db->selectVar($sql, $params);
    }
242528
protected function getMedia($id)
    {
        $media = $this->getMediaManager()->findOneBy(['id' => $id]);

        if (null === $media) {
            throw new NotFoundHttpException(sprintf('Media (%d) not found', $id));
        }

        return $media;
    }
93904
protected function getSnapshot($id)
    {
        $snapshot = $this->snapshotManager->findOneBy(['id' => $id]);

        if (null === $snapshot) {
            throw new NotFoundHttpException(sprintf('Snapshot (%d) not found', $id));
        }

        return $snapshot;
    }
1224147
public function actionShow($id)
    {
        $profile = $this->finder->findProfileById($id);

        if ($profile === null) {
            throw new NotFoundHttpException();
        }

        return $this->render('show', [
            'profile' => $profile,
        ]);
    }
608768
public function getVideoDetail($id)
    {
        $this->setId($id);

        $data = $this->getData(str_replace('{key}', $this->key, $this->baseVideoUrl));

        if(isset($data->error))
        {
            throw new \Exception("Video not found");
        }

        return array(
            'id'              => $data->items[0]->id,
            'title'           => $data->items[0]->snippet->title,
            'description'     => $data->items[0]->snippet->description,
            'thumbnail_small' => $data->items[0]->snippet->thumbnails->default->url,
            'thumbnail_large' => $data->items[0]->snippet->thumbnails->high->url,
            'duration'        => static::_convert_time($data->items[0]->contentDetails->duration),
            'upload_date'     => $data->items[0]->snippet->publishedAt,
            'like_count'      => isset($data->items[0]->statistics->likeCount) ? $data->items[0]->statistics->likeCount : 0,
            'view_count'      => isset($data->items[0]->statistics->viewCount) ? $data->items[0]->statistics->viewCount : 0,
            'comment_count'   => isset($data->items[0]->statistics->commentCount) ? $data->items[0]->statistics->commentCount : 0,
            'uploader'        => $data->items[0]->snippet->channelTitle
        );
    }
1186541
public function getRecieveStream($id)
    {
        $deferred = new Deferred();

        if (isset($this->recieveStreams[$id])) {
            $deferred->resolve($this->recieveStreams[$id]);

            return $deferred->promise();
        }

        foreach ($this->speakingStatus as $status) {
            if ($status->user_id == $id) {
                $deferred->resolve($this->recieveStreams[$status->ssrc]);

                return $deferred->promise();
            }
        }

        $deferred->reject(new \Exception("Could not find a recieve stream with the ID \"{$id}\"."));

        return $deferred->promise();
    }