gdetassigny/netflix-roulette

Netflix Roulette API的包装器

1.0.0 2017-07-31 21:45 UTC

This package is auto-updated.

Last update: 2024-09-09 04:57:27 UTC


README

请注意!!

由于Netflix roulette API现已停止服务,因此此包将无法再使用!

Build Status

Coverage Status

这是一个针对Netflix Roulette API的非官方PHP包装器。

安装

您可以通过composer安装此包装器。

只需输入

composer require gdetassigny/netflix-roulette

使用方法

该API应允许您根据给定参数检索电影和电视剧。(例如,检索所有由布拉德·皮特主演的电影。)

以下是如何使用此包装器的示例:

use GabrielDeTassigny\NetflixRoulette\Client;

$client = Client::getInstance();

$show = $client->findOne(['title' => 'Breaking Bad']);

var_dump($show->getSummary());
// "Emmy winner Bryan Cranston stars as Walter White, a high school science teacher who learns..."

$showList = $client->findMany(['actor' => 'Edward Norton']);

foreach ($showList as $show) {
    var_dump($show->getTitle());
}
// "The Italian Job"
// "The Score"
// "Strange Days on Planet Earth"
// "Primal Fear"
// "Rounders"
// "Frida"

您可以在API文档中查看更多示例参数。

要查看您可以检索电影/电视剧的信息,请查看接口