Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 1 month ago
JSON representation

:mag: :books: A book SDK, which can be used to get information of a book. 一个简单的图书 SDK,你可以使用它用于获取指定书籍的基本信息。

Awesome Lists containing this project

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