Get the list of all download Feeds
@throws \Exception
@return models\Download\Feed\DownloadFeed[]
@throws \GuzzleHttp\Exception\GuzzleException
433761
public function getAllFeeds()
    {
        $rest = $this->callService('GET', self::API_DOWNLOAD_FEEDS);

        return $rest->getModels(models\Download\Feed\DownloadFeed::class);
    }
1068433
public function getAllSubscriptions()
    {
        $limit = RequestInterface::MAX_LIST_LIMIT;
        $offset = 0;
        $subscriptions = [[]];

        while (true) {
            $subscriptionBatch = $this->getSubscriptionsResponse($offset);
            $subscriptions[] = $subscriptionBatch;
            $offset += $limit;
            if (\count($subscriptionBatch) < $limit) {
                break;
            }
        }

        return \array_merge(...$subscriptions);
    }
45997
public function addFeed( $downloadFeedUrl){
        $rest = $this->getService( self::API_DOWNLOAD_FEEDS);
        $rest->POST([
            'url' => $downloadFeedUrl,
        ]);

        return $rest->getResult( models\Download\Feed\DownloadFeed::class);
    }
687199
public function toArray()
    {
        return [
            'id' => $this->id,
            'filename' => $this->filename,
            'filetype' => $this->filetype,
            'filesize' => $this->filesize,
            'tags' => $this->tags,
            'preview_url' => $this->previewUrl(),
            'url' => $this->downloadUrl()
        ];
    }
608269
public function getAll(){
        $rest = $this->getService( self::API_VPN_CLIENT_CONFIG);
        $rest->GET();

        return $rest->getResultAsArray( models\VPN\Client\Config\ClientConfig::class);
    }
832456
public function getFeedItems( $downloadFeedId){
        $service = sprintf( self::API_DOWNLOAD_FEEDS_ITEMS, $downloadFeedId);
        $rest = $this->getService( $service);
        $rest->GET();

        return $rest->getResultAsArray( models\Download\Feed\DownloadFeedItem::class);
    }
771942
public function getBreadcrumbs()
    {
        $params = $this->getSourceParams();

        // Only apply breadcrumbs if a "ClassName" filter is applied. This implies that we came from the
        // "element type report".
        if (!isset($params[static::CLASS_NAME_FILTER_KEY])) {
            return [];
        }

        $report = ElementTypeReport::create();

        return [ArrayData::create([
            'Title' => $report->title(),
            'Link' => $report->getLink(),
        ])];
    }
508698
public function getFeed($options = []) {
        $pool = Registry::getStash();

        $cache = $pool->getItem('nyaa/feed/database/'.hash('sha512', json_encode($options)));

        if ($cache->isMiss()) {
            $cache->lock();

            $results = $this->getResults($options);
            $torrents = [];

            foreach ($results as $result) {
                $torrents[] = NyaaTorrent::fromArray($result);
            }

            $cache->set($torrents, 864000);
        }

        $data = $cache->get();

        return $data;
    }
501644
public function getBrowsers()
    {
        $period = $this->analyticsDuration();
        $data = Analytics::fetchTopBrowsers($period)->toArray();

        $items = [];
        shuffle($data); // shuffle results / randomimize chart color sections
        foreach ($data as $k => $item) {
            $items[] = $this->getPieDataSet($item['browser'], $item['sessions'], $k);
        }

        return $items;
    }
532776
public function getFeedItems($downloadFeedId)
    {
        $service = sprintf(self::API_DOWNLOAD_FEEDS_ITEMS, $downloadFeedId);
        $rest    = $this->callService('GET', $service);

        return $rest->getModels(models\Download\Feed\DownloadFeedItem::class);
    }
1015098
public function getAll()
    {
        return array(
            self::DEVELOPMENT => self::DEVELOPMENT,
            self::TESTING     => self::TESTING,
            self::STAGING     => self::STAGING,
            self::PRODUCTION  => self::PRODUCTION,
            );
    }
196336
public function getAllRequestClasses(): array
    {
        $allRequestClasses = [];

        foreach ($this->getDomainNames() as $domainName) {
            foreach ($this->getSectionNames($domainName) as $sectionName) {
                foreach ($this->getCategoryNames($domainName, $sectionName) as $categoryName) {
                    foreach ($this->getFqcnRequestNames($domainName, $sectionName, $categoryName) as $fqcnRequestName) {
                        $allRequestClasses[] = $fqcnRequestName;
                    }
                }
            }
        }

        return $allRequestClasses;
    }
1028962
public function getAll(): array
    {
        $response = $this->client->request('GET', $this->client->getConfig('base_uri') . '/shared-links/');

        $json = json_decode($response->getBody());

        $sharedLinksCollection = [];

        foreach ($json->fileshares as $sharedLink) {
            $sharedLinksCollection[] = (new SharedLinkType)->fromJson($sharedLink);
        }

        return $sharedLinksCollection;
    }
863267
public function getBrowsers() {
		$result = $this->apiCall('/browsers');

		$browsers = array();
		foreach ($result as $browserData) {
			$browser = new GTMetrixBrowser();
			$browser->fromArray($browserData);
			$browsers[] = $browser;
		}
		return $browsers;
	}
818144
public function getAll( $downloadTaskId){
        $service = sprintf( self::API_DOWNLOAD_PEERS, $downloadTaskId);
        $rest = $this->getService( $service);
        $rest->GET();

        return $rest->getResultAsArray( models\Download\Peer::class);
    }
760660
public function getAll(){
        $rest = $this->getService( self::API_SHARE_LINK);
        $rest->GET();

        return $rest->getResultAsArray( models\FileSystem\ShareLink::class);
    }
443029
public function listWatchers(): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/subscribers',
            $this->getActivity()->getOwner(), $this->getActivity()->getRepo()));
    }