定制 tongyifan/doubanphp 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tongyifan/doubanphp

Composer 安装命令:

composer require tongyifan/doubanphp

包简介

Library for parsing metadata information about movies and TV shows from Douban Movie

README 文档

README

Library for parsing metadata information about movies and TV shows from Douban Movie. This library use data api from Rhilip/pt-gen-cfworker, cache included.

  1. Setup your own pt-gen on Cloudflare worker See Rhilip/pt-gen-cfworker. Then change api_endpoint in conf/config.ini to your own cfworker.

  2. Requirements

  • PHP >= 5.6
  • PHP cURL extension
  • PHP JSON extension
  1. Install
composer install tongyifan/doubanphp
  1. Usage
<?php
require 'vendor/autoload.php';

use Douban\Douban;

$douban_id = '30458442';
$douban = new Douban($douban_id);

$douban_rating = $douban->douban_rating;
  1. Advanced usage
  • You can change cache settings by changing conf/config.ini.
  • Or change it in your application.
<?php
require 'vendor/autoload.php';

use Douban\Douban;
use Douban\Config;

$config = new Config();
// see https://book.cakephp.org/3/en/core-libraries/caching.html for more information.
$config->cache_config = [
    'className' => 'Redis',
    'duration' => '+14 days',
    'prefix' => 'doubanphp_',
    'host' => '127.0.0.1',
    'port' => 6379
];

$imdb_id = 'tt11043632';
$douban = new Douban($imdb_id, null, $config);
$douban_rating = $douban->douban_rating;

// or use numeric IMDb id, but you should add "source".
$imdb_id = '11043632';
$douban = new Douban($imdb_id, 'imdb', $config);
$douban_rating = $douban->douban_rating;

统计信息

  • 总下载量: 297
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固