2017 © Pedro Peláez
 

library librarything

A very simple LibraryThing web scraper API

image

rdx/librarything

A very simple LibraryThing web scraper API

  • Thursday, May 17, 2018
  • by rudiedirkx
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Library Thing API

use rdx\librarything\Client;
use rdx\librarything\WebAuth;

// Create an LT client.
$client = new Client(new WebAuth(LT_USER_NAME, LT_USER_PASS));

// Get all books from the catalogue. Returns array of rdx\librarything\Book.
$books = $client->getCatalogue();

// Get all collections.
$collections = $client->getCollections();

foreach ($books as $book) {
    var_dump($book->title);
    var_dump($book->author);
    var_dump($book->entry_date);
    var_dump($book->rating);
    var_dump($book->collections);
    var_dump($book->getCollections());
    var_dump($book->hasCollection(13));
}

$client->rateBook($book, 3); // 3 / 5

$client->toggleBookCollection($book, $collectionId, true); // true to add, false to remove

The Versions

17/05 2018

dev-master

9999999-dev

A very simple LibraryThing web scraper API

  Sources   Download

MIT

The Requires

 

by Rudie Dirkx

20/11 2017

1.0

1.0.0.0

A very simple LibraryThing web scraper API

  Sources   Download

MIT

The Requires

 

by Rudie Dirkx