Download the PHP package biblys/data-client-php without Composer

On this page you can find all versions of the php package biblys/data-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package data-client-php

Biblys Data PHP client library

Build Status

A PHP library to fetch data from or push data to Biblys Data.

Install

With composer:

Install with composer:

composer require biblys/data-client-php:~0

API

Client

$client = new Client(array options)

Initialize a new Biblys Data client.

Options:

$client->getBook(string $isbn)

Get book infos from Biblys Data server for this ISBN.

Returns a Book object if an object was found for this ISBN, returns false otherwise.

$client->pushBook(Book $book)

Send the Book object to server. Will test if there is already a book with this ISBN with getBook(). If there is, will use the updateBook() method to update it. Else, will use the createBook() method to create it.

$client->createBook(Book $book)

Will try create the book on the server. Throws an exception if there is already a book with this ISBN.

$client->updateBook(Book $book)

Not yet implemented on the server (will fail silently).

$client->pushPublisher(Publisher $publisher)

Send the Publisher object to server. Will test if there is already a book with this id with getPublisher(). If there is, will use the updatePublisher() method to update it. Else, will use the createPublisher() method to create it.

$client->createPublisher(Publisher $publisher)

Will try create the book on the server. Throws an exception if there is already a book with this ISBN.

$client->updatePublisher(Publisher $publisher)

Not yet implemented on the server (will fail silently).

Book

$book = new Book()

Create a new Book object

$book->setEan(string $isbn)

Set the book's ISBN. Throws an exception $isbn is not a valid ISBN.

$book->getEan()

Get the book's ISBN.

$book->setTitle(string $title)

Set the book's title

$book->getTitle()

Get the book's title

$book->setPublisher(Publisher $publisher)

Associate a Publisher resource with the book

$book->getPublisher()

Get the book's publisher as a Publisher object

$book->setAuthors(array $authors)

Set the book's authors (must be an array of Contributor objects)

$book->addAuthor(Author $author)

Associate a Contributor with the book as an author

$book->getAuthors()

Get the book's authors as an array of Contributor objects

Contributor

Multiple contributors can be associated with book as authors. Other roles (illustrator, translator, etc.) will come later.

$contributor = new Contributor()

Create a new Contributor object

$contributor->setId(string $id)

Set the contributor's id.

$contributor->getId()

Get the contributor's id.

$contributor->setFirstName(string $firstName)

Set the contributor's first name

$contributor->getFirstName()

Get the contributor's first name

$contributor->setLastName(string $lastName)

Set the contributor's last name

$contributor->getLastName()

Get the contributor's last name

$contributor->setName(string $name)

Set the contributor's full name (first + last names)

$contributor->getName()

Get the contributor's full name (first + last names)

Publisher

A publisher resource can be associated with a book.

$publisher = new Publisher()

Create a new Publisher object

$publisher->setId(string $id)

Set the publisher's id.

$publisher->getId()

Get the publisher's id.

$publisher->setName(string $name)

Set the publisher's name

$publisher->getName()

Get the publisher's name

Examples

Get a book's infos from an ISBN

Push a book's infos to server

Test

Run tests with PHPUnit:

Changelog

0.3.0 (2016-04-05)

0.2.1 (2016-03-25)

0.2.0 (2016-03-24)

0.1.0 (2016-03-05)


All versions of data-client-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
biblys/isbn Version ~2.0
guzzlehttp/guzzle Version ^6.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package biblys/data-client-php contains the following files

Loading the files please wait ....