All Projects → icyleaf → Kohana Douban

icyleaf / Kohana Douban

Licence: other
Douban API Package (PHP版本) 基于 Kohana 开发 (`master` for v3.0.x / `develop` for v3.2.x)

Labels

Projects that are alternatives of or similar to Kohana Douban

alfred-workflow
No description or website provided.
Stars: ✭ 26 (-44.68%)
Mutual labels:  douban
Doubanj
Visualize your reading history.
Stars: ✭ 342 (+627.66%)
Mutual labels:  douban
Focuslayoutmanager
有焦点item的水平/垂直滚动RecyclerView-LayoutManager。仿Android豆瓣书影音“推荐“频道列表布局
Stars: ✭ 772 (+1542.55%)
Mutual labels:  douban
Hexo Douban
💿 A simple plugin for hexo that helps us generate pages for douban books ,movies and games.
Stars: ✭ 277 (+489.36%)
Mutual labels:  douban
Weapp Douban Film
微信小程序-豆瓣电影
Stars: ✭ 303 (+544.68%)
Mutual labels:  douban
Petal
🌺 Douban.FM Client With Extra - - - 一个简洁的豆瓣FM客户端。
Stars: ✭ 460 (+878.72%)
Mutual labels:  douban
vue-douban
高仿豆瓣app
Stars: ✭ 22 (-53.19%)
Mutual labels:  douban
Douban Books Results
Douban books grabbed from doulists, series, and tags.
Stars: ✭ 38 (-19.15%)
Mutual labels:  douban
Pupafm
🎵 douban.fm Music Desktop Player
Stars: ✭ 341 (+625.53%)
Mutual labels:  douban
Wechat Miniprogram Examples
WeChat mini program examples. 微信小程序示例
Stars: ✭ 634 (+1248.94%)
Mutual labels:  douban
Rsshub
🍰 Everything is RSSible
Stars: ✭ 18,111 (+38434.04%)
Mutual labels:  douban
Douban Movie Extension
🎬豆瓣电影传送门
Stars: ✭ 301 (+540.43%)
Mutual labels:  douban
Douban
Douban book website demo by server side render
Stars: ✭ 468 (+895.74%)
Mutual labels:  douban
douban-imdb-api
一个基于豆瓣、IMDB、烂番茄评分的电影电视剧双语(中英)数据api接口
Stars: ✭ 351 (+646.81%)
Mutual labels:  douban
Meizi
豆瓣妹子图iOS客户端
Stars: ✭ 778 (+1555.32%)
Mutual labels:  douban
react-douban
豆瓣电影-react版本
Stars: ✭ 45 (-4.26%)
Mutual labels:  douban
Scrapydouban
豆瓣电影/豆瓣读书 Scarpy 爬虫
Stars: ✭ 400 (+751.06%)
Mutual labels:  douban
Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (+2082.98%)
Mutual labels:  douban
Douban spider
一个简单的豆瓣信息爬虫😄
Stars: ✭ 8 (-82.98%)
Mutual labels:  douban
Douya
开源的 Material Design 豆瓣客户端(A Material Design app for douban.com)
Stars: ✭ 4,502 (+9478.72%)
Mutual labels:  douban

Douban API Package Module (ONLY for Kohana v3.2)

项目不再维护开发。欢迎 PR,我会尽快合并发布新版本。

Douban API Package 是一个使用 PHP 开发且基于 Kohana v3 开发的一个扩展(Module)。

它对豆瓣 API 进行重新封包。 它使用起来非常方便,可以快速开发一个 web 应用。

为什么要另外封包?

对,豆瓣官方提供了一种 PHP 的解决方案,可是需要庞大的支持库: Zend GData(20M左右)以及可能无法修改的环境配置(租用的空间主机会遇到这样的问题)。 虽说 Douban API Package 也是基于框架开发,不过 Kohana 是一个纯 PHP5 模式且体积小巧,优秀迅捷的框架。 最重要的是,Douban API Package 提供了目前官方所有功能的支持。 并有线上网站:豆瓣 API 控制台长期运营。

虽然它是基于 Kohana 框架开发,但是并没有使用太多框架的依赖,可在独立环境把报错地方替换从而轻松分离出来(通过邮件沟通得知成功案例)

支持 API 列表

目前 Douban API Package 支持豆瓣网提供 API 的全部功能,列表如下:

  • People - 获取用户信息,搜索用户
  • Book - 获取图书信息(subject id,ibsn)和标签,搜索图书
  • Movie - 获取电影信息(subject id,imdb)和标签,搜索电影
  • Music - 获取音乐信息和标签,搜索音乐
  • Broadcast - 获取广播信息(自己或友邻),发布广播,回复广播,删除广播
  • Collection - 获取收藏信息(条目或用户),创建收藏,删除收藏
  • Doumail - 获取豆邮信息(未读邮件,收件箱,发件箱),发送豆邮,删除豆邮
  • Event - 获取同城活动信息(通过用户或城市),获取同城详情(活动信息,GEO信息,参加人数详情,感兴趣人数详情),同城活动操作(参加/感兴趣/不参加),发布同城活动,更新同城活动,删除同城活动
  • Note - 获取用户日记信息,发布日记,更新日记,删除日记
  • Recommendation - 获取用户推荐信息,发布推荐,回应推荐,删除推荐,删除回应
  • Review - 获取条目评论信息(书影音),获取用户评论信息,发布评论,更新评论,删除评论
  • Album - 获取相册信息(目前只能获取同城活动的相册,偶然在 Event 的 API 字段中发现此接口)

已发现 API (受限)

  • Host - http://api.douban.com/host/{id} 访问会提示 access page limit.

安装需求

  • PHP 5.2.8+ with curl module
  • Kohana v3 - 一款纯 PHP 5 框架,它的特点就是高安全性轻量级代码容易使用

安装步骤

步骤 0: 部署 Kohana

下载并安装 Kohana 的过程,请大家参考此教程:使用 Git 部署 Kohana 系统

步骤 1: 下载本扩展!

你可以在部署完毕的 Kohana 系统的根目录执行下面操作:

$ git submodule add git://github.com/icyleaf/douban.git modules/douban

完成!

或者你也可以从本 github 项目下载压缩包放置在 modules 文件夹下面。

步骤 2: 在 bootstrap.php 文件中启用该模块(默认情况下,存储在 `application' 文件夹)

/**
 * Enable modules. Modules are referenced by a relative or absolute path.
 */
Kohana::modules(array(
  'douban'        => MODPATH.'douban',     // Douban API Module
	// 'database'   => MODPATH.'database',   // Database access
	// 'image'      => MODPATH.'image',      // Image manipulation
	// 'orm'        => MODPATH.'orm',        // Object Relationship Mapping (not complete)
	// 'pagination' => MODPATH.'pagination', // Paging of results
	// 'paypal'     => MODPATH.'paypal',     // PayPal integration (not complete)
	// 'todoist'    => MODPATH.'todoist',    // Todoist integration
	// 'unittest'   => MODPATH.'unittest',   // Unit testing
	// 'codebench'  => MODPATH.'codebench',  // Benchmarking tool
	));

目录结构

douban
  +--- classes
         +--- controller               # 豆瓣样例
         +--- douban
	            +--- api               # Douban API
					  +--- book.php
					  +--- .
					  +--- .
					  +--- .
				+--- core.php          # Douban Core
				+--- oauth.php         # Douban OAuth
				+--- request.php       # Douban Requset 
				+--- response.php      # Douban Response
         +--- douban.php               # Douban API Class
  +--- config
         +--- douban.php               # 豆瓣 API 配置文件
		 +--- user_agents.php          # 奉送给大家一些手机 User agent 配置文件
  +--- media
         +--- images                   # 奉送给大家豆瓣 API 用到的图像		
  +--- vendor
         +--- OAuth.php                # OAuth 官方推荐 PHP 库
  +--- LICENSE
  +--- README.markdown

快速上手

  • Douban API Package 提供一些演示用例,系统部署完毕后可以通过 http://host/douban_demo 或者 http://host/douban_console 访问。

祝你开发顺利!

如果任何疑问或者 Bugs 反馈,即可以在本项目中提交 Issue。

04/22/2012

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].