Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Littlesqx/douban-book
:mag: :books: A book SDK, which can be used to get information of a book. 一个简单的图书 SDK,你可以使用它用于获取指定书籍的基本信息。
https://github.com/Littlesqx/douban-book
book-api douban-book
Last synced: 10 days ago
JSON representation
:mag: :books: A book SDK, which can be used to get information of a book. 一个简单的图书 SDK,你可以使用它用于获取指定书籍的基本信息。
- Host: GitHub
- URL: https://github.com/Littlesqx/douban-book
- Owner: Littlesqx
- License: mit
- Created: 2018-09-24T10:49:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-20T06:56:50.000Z (over 5 years ago)
- Last Synced: 2024-07-31T12:08:08.202Z (3 months ago)
- Topics: book-api, douban-book
- Language: PHP
- Homepage: https://packagist.org/packages/littlesqx/douban-book
- Size: 33.2 KB
- Stars: 62
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- favorite-link - 一个简单的图书 SDK,你可以使用它用于获取指定书籍的基本信息。
README
douban-book
:mag: :books: A book SDK, which can be used to get information of a book.
一个简单的图书 SDK,你可以使用它用于获取指定书籍的基本信息。[![Build Status](https://travis-ci.org/Littlesqx/douban-book.svg?branch=master)](https://travis-ci.org/Littlesqx/douban-book)
[![StyleCI](https://github.styleci.io/repos/150088434/shield?branch=master)](https://github.styleci.io/repos/150088434)## Requirement
- PHP >= 7.1
- Composer## Installing
```shell
composer require littlesqx/douban-book -vvv
```## Usage
```php
getBook($isbn);
// use as an array
$book->toArray();
// or get json format
$book->toJSON();
// also, get property directly is allowed
$book->getTitle();
$book->getPrice();
} catch (\Exception $exception) {
// handle exception
}```
## Test
```shell
composer test
```## Contributing
You can contribute in one of three ways:
1. File bug reports using the [issue tracker](https://github.com/littlesqx/douban-book/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/littlesqx/douban-book/issues).
3. Contribute new features or update the wiki._The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable._
## Thanks
- [豆瓣 API](https://developers.douban.com)
- [overtrue](https://github.com/overtrue)
## License
MIT