Goodreads
PHP wrapper to communicate with Goodreads API., (*1)
, (*2)
Requirements
Installation
composer require njt/good-reads
Getting Started
Before using Goodreads API you must create a new application. Visit signup form for details., (*3)
Setup client:, (*4)
``` php
$gr = new GoodReads('api_key');, (*5)
## Examples
### Lookup books
You can lookup a book by ISBN, ID or Title:
```php
$gr->bookByISBN("ISBN");
$gr->book("id");
Search for books:, (*6)
$gr->searchBook("Search any think");
$gr->searchBookByName("Book Name");
$gr->searchBookByAuthorName('Author Name');
Authors
Look up an author by their Goodreads Author ID:, (*7)
$author = $gr->authorByID("id");
Look up an author books by their Goodreads Author ID:, (*8)
$books = $gr->authorBooks("id");
Get Author ID by Author Name:, (*9)
$id = $gr->authorIDByName("Author Name");
Look up an author by name:, (*10)
$author = $gr->authorByName("Author Name");
Author series:, (*11)
$series = $gr->seriesByAuthor("id");
Reviews
Get review details:, (*12)
$review = $gr->review('id');
Get User review details by Book:, (*13)
$review = $gr->userReviewByBook('userID', 'bookID');
User
Get the user by id:, (*14)
$user = $gr->userInfoByID('id');
Get the user by username:, (*15)
$user = $gr->userInfoByUsername('username');
Groups
Get group details:, (*16)
$group = $gr->group('id', 'sort');
The sort parameter is optional, and defaults to title.
One of comments_count, title, updated_at, views, (*17)
Find group by Name:, (*18)
$groups = $gr->findGroup('group Name');
List the groups a given user is a member of:, (*19)
$groups = $gr->groupsOfUser('userID', 'sort');
The sort parameter is optional, and defaults to members.
One of my_activity, members, last_activity, title, (*20)
List the group Members a given group id:, (*21)
$members = $gr->groupMembers('id');
Contributions
You're welcome to submit patches and new features., (*22)
- Create a new branch for your feature of bugfix
- Add tests so it does not break any existing code
- Open a new pull request
- Check official API documentation
License
The MIT License (MIT), (*23)
Nijat Asadov, nijatasadov@gmail.com, (*24)