tp/guzzle-dawanda
最新稳定版本:v0.1.0-beta
Composer 安装命令:
composer require tp/guzzle-dawanda
包简介
A Guzzle implementation of the DaWanda API
README 文档
README
A basic Guzzle implementation of the DaWanda API v1. This is only implementing the Basic API, I am currently working on extending it with more features and writing the OAuth Provider.
Installation
Composer
Require the following package in your composer.json
require: {
...
"tp/guzzle-dawanda": "dev-master",
...
}
Get an API key over at DaWanda
Fetch it here: http://www.dawanda.com/apps
Usage
There are 3 available languages supported by DaWanda at the moment, 'de', 'en' and 'fr'.
<?php use Guzzle\DaWanda\DaWandaClient; // Get the client using the factory $client = DaWandaClient::factory(array( 'language' => 'en', // default 'api_key' => '******', // Your API key here 'format' => 'json' // or 'xml' )); // Use the client $result = $client->SearchUsers(array( 'keyword' => 'Liebe-und-Kraft' )); // Pagination $result = $client->SearchUsers(array( 'keyword' => 'Liebe-und-Kraft', 'per_page' => 30, // default is 10 'page' => 3 // Third page, default is 1 ));
See https://github.com/tPl0ch/guzzle-dawanda/blob/master/src/DaWanda/DaWanda.json for all supported methods
TODO
- Add ResourceIterator for easily abstracting away pagination
- Add Models so reusing the result objects is more fun
- Increase test coverage
Further Reading
The documentation over at guzzle is pretty informative, too, so check it out: http://guzzlephp.org/docs.html
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-12-07