{"id":13849383,"url":"https://github.com/icyleaf/kohana-douban","last_synced_at":"2025-07-12T16:32:00.258Z","repository":{"id":775963,"uuid":"463253","full_name":"icyleaf/kohana-douban","owner":"icyleaf","description":"Douban API Package (PHP版本) 基于 Kohana 开发 (`master` for v3.0.x / `develop` for v3.2.x) ","archived":true,"fork":false,"pushed_at":"2015-09-24T07:11:38.000Z","size":287,"stargazers_count":48,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2024-08-05T19:37:00.089Z","etag":null,"topics":["douban","kohana","php"],"latest_commit_sha":null,"homepage":"http://ews.im/douban_console","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icyleaf.png","metadata":{"files":{"readme":"README.markdown","changelog":"CHANGELOG.markdown","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-01-08T02:19:25.000Z","updated_at":"2023-01-28T17:44:09.000Z","dependencies_parsed_at":"2022-07-12T14:54:26.580Z","dependency_job_id":null,"html_url":"https://github.com/icyleaf/kohana-douban","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyleaf%2Fkohana-douban","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyleaf%2Fkohana-douban/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyleaf%2Fkohana-douban/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icyleaf%2Fkohana-douban/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icyleaf","download_url":"https://codeload.github.com/icyleaf/kohana-douban/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225829364,"owners_count":17530663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["douban","kohana","php"],"created_at":"2024-08-04T19:01:15.906Z","updated_at":"2024-11-22T01:30:51.262Z","avatar_url":"https://github.com/icyleaf.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Douban API Package Module (ONLY for Kohana v3.2)\n\n\u003e 项目**不再**维护开发。欢迎 PR，我会尽快合并发布新版本。\n\nDouban API Package 是一个使用 PHP 开发且基于 Kohana v3 开发的一个扩展（Module）。\n\n它对[豆瓣](http://www.douban.com/) [API](http://www.douban.com/service/apidoc/) 进行重新封包。\n它使用起来非常方便，可以快速开发一个 web 应用。\n\n## 为什么要另外封包？\n\n对，豆瓣官方提供了一种 PHP 的解决方案，可是需要庞大的支持库：\nZend GData（20M左右）以及可能无法修改的环境配置（租用的空间主机会遇到这样的问题）。\n虽说 Douban API Package 也是基于框架开发，不过 Kohana 是一个纯 PHP5 模式且体积小巧，优秀迅捷的框架。\n**最重要的是**，Douban API Package 提供了目前官方所有功能的支持。\n并有线上网站：[豆瓣 API 控制台](http://ews.im/douban_console)长期运营。\n\n \u003e 虽然它是基于 Kohana 框架开发，但是并没有使用太多框架的依赖，可在独立环境把报错地方替换从而轻松分离出来(通过邮件沟通得知成功案例)\n\n## 支持 API 列表\n\n目前 Douban API Package 支持豆瓣网提供 API 的全部功能，列表如下：\n\n* People - 获取用户信息，搜索用户\n* Book - 获取图书信息（subject id，ibsn）和标签，搜索图书\n* Movie - 获取电影信息（subject id，imdb）和标签，搜索电影\n* Music - 获取音乐信息和标签，搜索音乐\n* Broadcast - 获取广播信息（自己或友邻），发布广播，回复广播，删除广播\n* Collection - 获取收藏信息（条目或用户），创建收藏，删除收藏\n* Doumail - 获取豆邮信息（未读邮件，收件箱，发件箱），发送豆邮，删除豆邮\n* Event - 获取同城活动信息（通过用户或城市），获取同城详情（活动信息，GEO信息，参加人数详情，感兴趣人数详情），同城活动操作（参加/感兴趣/不参加），发布同城活动，更新同城活动，删除同城活动\n* Note - 获取用户日记信息，发布日记，更新日记，删除日记\n* Recommendation - 获取用户推荐信息，发布推荐，回应推荐，删除推荐，删除回应\n* Review - 获取条目评论信息（书影音），获取用户评论信息，发布评论，更新评论，删除评论\n* Album - 获取相册信息（目前只能获取同城活动的相册，偶然在 Event 的 API 字段中发现此接口）\n\n## 已发现 API （受限）\n\n* Host - `http://api.douban.com/host/{id}` 访问会提示 `access page limit`.\n\n\n## 安装需求\n\n* PHP 5.2.8+ with curl module\n* [Kohana v3](http://github.com/kohana/kohana) - 一款纯 PHP 5 框架，它的特点就是**高安全性**，**轻量级代码**，**容易使用**。 \n\n## 安装步骤\n\n步骤 0: 部署 Kohana\n\n下载并安装 Kohana 的过程，请大家参考此教程：[使用 Git 部署 Kohana 系统](http://kohanaframework.org/3.2/guide/kohana/tutorials/git)\n\n步骤 1: 下载本扩展!\n\n你可以在部署完毕的 Kohana 系统的根目录执行下面操作：\n\n\t$ git submodule add git://github.com/icyleaf/douban.git modules/douban\n\n完成！\n\n或者你也可以从本 [github 项目](http://github.com/icyleaf/douban)下载压缩包放置在 modules 文件夹下面。\n\n步骤 2: 在 `bootstrap.php` 文件中启用该模块(默认情况下，存储在 `application' 文件夹)\n\n\t/**\n\t * Enable modules. Modules are referenced by a relative or absolute path.\n\t */\n\tKohana::modules(array(\n\t  'douban'        =\u003e MODPATH.'douban',     // Douban API Module\n\t\t// 'database'   =\u003e MODPATH.'database',   // Database access\n\t\t// 'image'      =\u003e MODPATH.'image',      // Image manipulation\n\t\t// 'orm'        =\u003e MODPATH.'orm',        // Object Relationship Mapping (not complete)\n\t\t// 'pagination' =\u003e MODPATH.'pagination', // Paging of results\n\t\t// 'paypal'     =\u003e MODPATH.'paypal',     // PayPal integration (not complete)\n\t\t// 'todoist'    =\u003e MODPATH.'todoist',    // Todoist integration\n\t\t// 'unittest'   =\u003e MODPATH.'unittest',   // Unit testing\n\t\t// 'codebench'  =\u003e MODPATH.'codebench',  // Benchmarking tool\n\t\t));\n\n## 目录结构\n\t\n\tdouban\n\t  +--- classes\n\t         +--- controller               # 豆瓣样例\n\t         +--- douban\n\t\t            +--- api               # Douban API\n\t\t\t\t\t\t  +--- book.php\n\t\t\t\t\t\t  +--- .\n\t\t\t\t\t\t  +--- .\n\t\t\t\t\t\t  +--- .\n\t\t\t\t\t+--- core.php          # Douban Core\n\t\t\t\t\t+--- oauth.php         # Douban OAuth\n\t\t\t\t\t+--- request.php       # Douban Requset \n\t\t\t\t\t+--- response.php      # Douban Response\n\t         +--- douban.php               # Douban API Class\n\t  +--- config\n\t         +--- douban.php               # 豆瓣 API 配置文件\n\t\t\t +--- user_agents.php          # 奉送给大家一些手机 User agent 配置文件\n\t  +--- media\n\t         +--- images                   # 奉送给大家豆瓣 API 用到的图像\t\t\n\t  +--- vendor\n\t         +--- OAuth.php                # OAuth 官方推荐 PHP 库\n\t  +--- LICENSE\n\t  +--- README.markdown\n\t\n## 快速上手\n\n* Douban API Package 提供一些演示用例，系统部署完毕后可以通过 `http://host/douban_demo` 或者 `http://host/douban_console` 访问。 \n\n## 祝你开发顺利！\n\n如果任何疑问或者 Bugs 反馈，即可以在本项目中提交 Issue。\n\n* Twitter: @icyleaf\n* 新浪微博: @icyleaf\n\n04/22/2012\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficyleaf%2Fkohana-douban","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficyleaf%2Fkohana-douban","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficyleaf%2Fkohana-douban/lists"}