/** * Retrieve the content of a public or unlisted paste. * @param \Brush\Accounts\Developer $developer The developer account to use for the request. * @param \Brush\Pastes\Paste $paste The paste whose content to retrieve. * @return string The paste content. */ private static final function getPrivateContent(Developer $developer, Paste $paste) { assert($paste->getVisibility() === Visibility::VISIBILITY_PRIVATE); $pastebin = new ApiRequest($developer, self::PRIVATE_CONTENTS_ENDPOINT); $pastebin->setOption('show_paste'); $pastebin->getRequest()->getVariables()->set('api_paste_key', $paste->getKey()); $paste->getOwner()->sign($pastebin->getRequest(), $developer); return $pastebin->send(); }