gpenverne / opensubtitles
A bundle for kminek/open-subtitles
1.0
2017-01-15 11:00 UTC
Requires
- php: >=5.4
- kminek/open-subtitles: dev-master
- symfony/dependency-injection: *
This package is not auto-updated.
Last update: 2024-11-10 03:31:02 UTC
README
This repo provides a service for symfony3 to handle the kminek/open-subtitles client. This client allow to fetch subtitles from opensubtitles.org
Config/Parameters
Set your parameters.yml with your custom credentials:
parameters:
opensubtitles.username: ~
opensubtitles.password: ~
opensubtitles.user_agent: OSTestUserAgentTemp
Load the bundle from your AppKernel.php file:
$bundles = [
new Gpenverne\OpenSubtitlesBundle\OpenSubtitlesBundle(),
...,
];
Use it
$this->container->get('opensubtitles_api')->getSubtitles('A movie title');
$this->container->get('opensubtitles_api')->getSubtitles(1234); // Search from imdbid
$client = $this->container->get('opensubtitles_api')->getClient(); // Return the kminek/open-subtitles client