PHPackages                             takisrs/biblionet-api-wrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. takisrs/biblionet-api-wrapper

ActiveLibrary[API Development](/categories/api)

takisrs/biblionet-api-wrapper
=============================

A wrapper library for biblionet's api

1.0.0(5y ago)114MITPHP

Since Feb 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/takisrs/biblionet-api-wrapper)[ Packagist](https://packagist.org/packages/takisrs/biblionet-api-wrapper)[ Docs](https://github.com/takisrs/biblionet-api-wrapper)[ RSS](/packages/takisrs-biblionet-api-wrapper/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

A wrapper library for biblionet's API
=====================================

[](#a-wrapper-library-for-biblionets-api)

A wrapper library for biblionet's API, written in PHP, to help you fetch books' data easily.

Read more about [biblionet](https://biblionet.gr/) and their [api](https://biblionet.gr/webservice/)

Installation
------------

[](#installation)

`composer require takisrs/biblionet-api-wrapper`

How to use
----------

[](#how-to-use)

### Fetch a book by id and display some info

[](#fetch-a-book-by-id-and-display-some-info)

```
use takisrs\Biblionet\ApiFetcher;

// Initialize the fetcher class
$fetcher = new ApiFetcher("testuser", "testpsw");

// Fetch a book
$fetchedItems = $fetcher->fetch(ApiFetcher::FETCH_BY_ID, 252822)->getItems();

// Get the Book object
$fetchedBook = reset($fetchedItems);

// Output some info with the help of getters
if ($fetchedBook){
    echo $fetchedBook->getTitle() . " => " . $fetchedBook->getLanguage()->getName().PHP_EOL;
}
```

### Fetch current month's hardcopy books with their contributors and display some info

[](#fetch-current-months-hardcopy-books-with-their-contributors-and-display-some-info)

```
use takisrs\Biblionet\ApiFetcher;

$fetcher = new ApiFetcher("testuser", "testpsw");

// Fetch current month's books
$fetcher->fetch(ApiFetcher::FETCH_BY_MONTH, date("Y-m"));

// Keep only the hardcopy books
$fetcher->filter('type', 'Βιβλίο', '==');

// Fill the rest with extra data (contributors)
$fetcher->fill([ApiFetcher::FILL_CONTRIBUTORS]);

// Get an array of books
$fetchedItems = $fetcher->getItems();

// Display some info
foreach ($fetchedItems as $item) {
    echo "**** " . $item->getTitle() . " ****" . PHP_EOL;
    echo "Publication Date: " . $item->getFirstPublishDate()->format("d/m/y") . PHP_EOL;
    echo "Weight: " . $item->getWeight() . ' g' . PHP_EOL;
    echo "Price: " . $item->getPrice() . ' €' . PHP_EOL;

    $contributors = $item->getContributors();

    foreach ($contributors as $contributor) {
        echo $contributor->getTypeName() . ": " . $contributor->getName() . PHP_EOL;
    }
    echo PHP_EOL;
}
```

### Examples on how to use the fetch method

[](#examples-on-how-to-use-the-fetch-method)

```
$fetcher->fetch(ApiFetcher::FETCH_BY_ID, 252986); // specific book
$fetcher->fetch(ApiFetcher::FETCH_BY_ID, [253064, 252986, 252976]); // specific books
$fetcher->fetch(ApiFetcher::FETCH_BY_MONTH); // current month's books
$fetcher->fetch(ApiFetcher::FETCH_BY_MONTH, "2020-10"); // specific month's books
$fetcher->fetch(ApiFetcher::FETCH_BY_MONTH, "2020-10", "2021-01"); // specific period's books
```

You may also combine all the above. ex:

```
// January's book of the last 3 years
$fetcher->fetch(ApiFetcher::FETCH_BY_MONTH, "2019-01")->fetch(ApiFetcher::FETCH_BY_MONTH, "2020-01")->fetch(ApiFetcher::FETCH_BY_MONTH, "2021-01");
```

### Examples on how to use the filter method

[](#examples-on-how-to-use-the-filter-method)

```
$fetcher->filter('type', 'e-book', '=='); // Keep only the ebooks
$fetcher->filter('place.name', 'Αθήνα', '=='); // Keep only those published in Athens
$fetcher->filter('cover', 'Μαλακό εξώφυλλο', '=='); // Keep only those with a soft cover
$fetcher->filter('availability', 'Κυκλοφορεί', '=='); // Keep only the available ones
$fetcher->filter('id', 253064, '>='); // Keep the books with an id >= 253064
```

You may also combine all the above.

### More Examples

[](#more-examples)

You may check for more examples in the [examples](examples/) folder on this repository.

Documentation
-------------

[](#documentation)

You may read the full documentation [here](https://takisrs.github.io/biblionet-api-wrapper/) or check the docs bellow.

- [\\takisrs\\Biblionet\\ApiFetcher](#class-takisrsbiblionetapifetcher)
- [\\takisrs\\Biblionet\\Helper](#class-takisrsbiblionethelper)
- [\\takisrs\\Biblionet\\Logger](#class-takisrsbiblionetlogger)
- [\\takisrs\\Biblionet\\Models\\Category](#class-takisrsbiblionetmodelscategory)
- [\\takisrs\\Biblionet\\Models\\Book](#class-takisrsbiblionetmodelsbook)
- [\\takisrs\\Biblionet\\Models\\Company](#class-takisrsbiblionetmodelscompany)
- [\\takisrs\\Biblionet\\Models\\Contributor](#class-takisrsbiblionetmodelscontributor)
- [\\takisrs\\Biblionet\\Models\\Subject](#class-takisrsbiblionetmodelssubject)
- [\\takisrs\\Biblionet\\Models\\Place](#class-takisrsbiblionetmodelsplace)
- [\\takisrs\\Biblionet\\Models\\Language](#class-takisrsbiblionetmodelslanguage)

---

### Class: \\takisrs\\Biblionet\\ApiFetcher

[](#class-takisrsbiblionetapifetcher)

> A wrapper class for biblionet's api. This library will help you fetch books' data from biblionet database. It provides some helpful methods that simplify the communication with their api.

VisibilityFunctionpublic**\_\_construct(***string* **$username**, *string* **$password**, *array* **$log=array()**, *integer* **$requestTimeout=10**, *integer* **$resultsPerPage=50**) : *void*
*ApiFetcher constructor*public**fetch(***string* **$fetchType=1**, *string/int/array* **$param1=null**, *string* **$param2=null**) : *[\\takisrs\\Biblionet\\ApiFetcher](#class-takisrsbiblionetapifetcher)*
*Fetch books from biblionet's api. You may call with method to fetch data for a specific book, or provide a month to fetch books published in that month. You may also provide two months to fetch books published in that period.*public**fill(***array* **$types=array()**) : *[\\takisrs\\Biblionet\\ApiFetcher](#class-takisrsbiblionetapifetcher)*
*Fill with extra data the already fetched items. You may use this method to fetch extra data from biblionet's api for the books that you have fetch with the fetch() method. This method, depending the params, makes extra api requests to the api to fetch the requested data, so it may be slow. Use this method if you want to fetch book's subjects, contributors or companies.*public**filter(***\\string* **$field**, *mixed* **$value**, *\\string* **$operator=`'=='`**) : *[\\takisrs\\Biblionet\\ApiFetcher](#class-takisrsbiblionetapifetcher)*
*Filter the already fetched items. Use this method to narrow down the number of books that have already been fetched depending on specific filters. You may, for example, use this method to keep only the hardcopy books from the fetched items.*public**getItems()** : *Book\[\] an array of Book objects*
*Returns the fetched items. Use this method to get all the data that have been fetch from biblionet's api.*---

### Class: \\takisrs\\Biblionet\\Helper

[](#class-takisrsbiblionethelper)

> A helper class that provides some static functions.

VisibilityFunctionpublic static**compare(***mixed* **$var1**, *mixed* **$var2**, *\\string* **$operator**) : *bool The result of the comparison*
*Makes a comparison between two variables*public static**getPercentage(***integer/\\int* **$current**, *integer/\\int* **$total**) : *float the percentage*
*Calculates and return a percentage of completion*public static**isCli()** : *bool*
*Checks if the script has been called through cli*public static**isJson(***\\string* **$str**) : *bool*
*Checks if a string is json*---

### Class: \\takisrs\\Biblionet\\Logger

[](#class-takisrsbiblionetlogger)

> A helper class to output logs.

VisibilityFunctionpublic**\_\_construct(***array* **$show=array()**) : *void*
*Constructor.*public**disable()** : *void*
*Disables the logging*public**enable()** : *void*
*Enables the logging*public**log(***\\string* **$type**, *\\string* **$entity**, *\\string* **$title**, *\\string* **$text=`''`**, *\\float* **$percentage=null**) : *void*
*Logs an entry.*---

### Class: \\takisrs\\Biblionet\\Models\\Category

[](#class-takisrsbiblionetmodelscategory)

> The model class of Category

VisibilityFunctionpublic**\_\_construct(***int* **$id**, *string* **$name**) : *void*
*category constructor*public**getId()** : *int*
*get the id of the category*public**getName()** : *string*
*get the name of the category*---

### Class: \\takisrs\\Biblionet\\Models\\Book

[](#class-takisrsbiblionetmodelsbook)

> The model class of Book

VisibilityFunctionpublic**\_\_construct(***mixed* **$data**) : *void*public**getAgeFrom()** : *int*
*Get the value of ageFrom*public**getAgeTo()** : *int*
*Get the value of ageTo*public**getAlternativeTitle()** : *string*
*Get the value of alternativeTitle*public**getAvailability()** : *string*
*Get the value of availability*public**getCategory()** : *[\\takisrs\\Biblionet\\Models\\Category](#class-takisrsbiblionetmodelscategory)*
*Get the value of category*public**getComments()** : *string*
*Get the value of comments*public**getCompanies()** : *[\\takisrs\\Biblionet\\Models\\Company](#class-takisrsbiblionetmodelscompany)\[\]*
*Get the array of Company objs*public**getContributors()** : *[\\takisrs\\Biblionet\\Models\\Contributor](#class-takisrsbiblionetmodelscontributor)\[\]*
*Get the array of Contributor objs*public**getCover()** : *string*
*Get the value of cover*public**getCurrentPublishDate()** : *mixed*
*Get the value of currentPublishDate*public**getDimensions()** : *string*
*Get the value of dimensions*public**getEditionNo()** : *string*
*Get the value of editionNo*public**getFirstPublishDate()** : *mixed*
*Get the value of firstPublishDate*public**getFuturePublishDate()** : *mixed*
*Get the value of futurePublishDate*public**getId()** : *int*
*Get the value of id*public**getImage()** : *string*
*Get the value of image*public**getIsbn()** : *string*
*Get the value of isbn*public**getIsbn2()** : *string*
*Get the value of isbn2*public**getIsbn3()** : *string*
*Get the value of isbn3*public**getLanguage()** : *[\\takisrs\\Biblionet\\Models\\Language](#class-takisrsbiblionetmodelslanguage)*
*Get the value of language*public**getLastUpdated()** : *[\\Datetime](http://php.net/manual/en/class.datetime.php)*
*Get the value of lastUpdated*public**getMultiVolumeTitle()** : *string*
*Get the value of multiVolumeTitle*public**getOriginalLanguage()** : *[\\takisrs\\Biblionet\\Models\\Language](#class-takisrsbiblionetmodelslanguage)*
*Get the value of originalLanguage*public**getOriginalTitle()** : *string*
*Get the value of originalTitle*public**getPageNo()** : *int*
*Get the value of pageNo*public**getPlace()** : *[\\takisrs\\Biblionet\\Models\\Place](#class-takisrsbiblionetmodelsplace)*
*Get the value of place*public**getPrice()** : *float*
*Get the value of price (euros)*public**getPublisher()** : *[\\takisrs\\Biblionet\\Models\\Company](#class-takisrsbiblionetmodelscompany)*
*Get the value of publisher*public**getSeries()** : *string*
*Get the value of series*public**getSeriesNo()** : *string*
*Get mapped to SeriesNo*public**getSpecifications()** : *string*
*Get the value of specifications*public**getSubSeries()** : *string*
*Get mapped to SubSeries*public**getSubSeriesNo()** : *string*
*Get mapped to SubSeriesNo*public**getSubjects()** : *[\\takisrs\\Biblionet\\Models\\Subject](#class-takisrsbiblionetmodelssubject)\[\]*
*Get the array of Subject objs*public**getSubtitle()** : *string*
*Get the value of subtitle*public**getSummary()** : *string*
*Get the value of summary*public**getTitle()** : *string*
*Get the value of title*public**getTranslatedLanguage()** : *[\\takisrs\\Biblionet\\Models\\Language](#class-takisrsbiblionetmodelslanguage)*
*Get the value of translatedLanguage*public**getType()** : *string*
*Get the value of type*public**getVat()** : *float*
*Get the value of vat (percentage)*public**getVolumeCount()** : *string*
*Get the value of volumeCount*public**getVolumeNo()** : *string*
*Get the value of volumeNo*public**getWebAddress()** : *string*
*Get the value of webAddress*public**getWeight()** : *int*
*Get the value of weight (grams)*public**getWriter()** : *[\\takisrs\\Biblionet\\Models\\Contributor](#class-takisrsbiblionetmodelscontributor)*
*Get the value of writer*public**setCompanies(***array* **$data**) : *void*
*Init Book's companies*public**setContributors(***array* **$data**) : *void*
*Init Book's contributors*public**setSubjects(***array* **$data**) : *void*
*Init Book's subjects*---

### Class: \\takisrs\\Biblionet\\Models\\Company

[](#class-takisrsbiblionetmodelscompany)

> The model class of Company (ex. publisher)

VisibilityFunctionpublic**\_\_construct(***int* **$id**, *string* **$name**, *int* **$typeId=1**, *string* **$typeName=`'Εκδότης'`**, *int* **$order**) : *void*
*Company constructor*public**getId()** : *int*
*Get the id of the category*public**getName()** : *string*
*Get the name of the category*public**getOrder()** : *int*
*Get the order of the category*public**getTypeId()** : *int*
*Get the type id of the category*public**getTypeName()** : *string*
*Get the type name of the category*---

### Class: \\takisrs\\Biblionet\\Models\\Contributor

[](#class-takisrsbiblionetmodelscontributor)

> The model class of Contributor (ex. writer)

VisibilityFunctionpublic**\_\_construct(***int* **$id**, *string* **$name**, *int* **$typeId=1**, *string* **$typeName=`'Συγγραφέας'`**, *int* **$order**) : *void*
*Contributor constructor*public**getId()** : *int*
*Get the id of the contributor*public**getName()** : *string*
*Get the name of the contributor*public**getOrder()** : *int*
*Get the order of the contributor*public**getTypeId()** : *int*
*Get the type id of the contributor*public**getTypeName()** : *string*
*Get the type name of the contributor*---

### Class: \\takisrs\\Biblionet\\Models\\Subject

[](#class-takisrsbiblionetmodelssubject)

> The model class of Subject

VisibilityFunctionpublic**\_\_construct(***int* **$id**, *string* **$name**, *string* **$ddc**, *int* **$order**) : *void*
*Subject constructor*public**getDdc()** : *string*
*Get the DDC of subject*public**getId()** : *int*
*Get the id of subject*public**getName()** : *string*
*Get the name of subject*public**getOrder()** : *int*
*Get the order of subject*---

### Class: \\takisrs\\Biblionet\\Models\\Place

[](#class-takisrsbiblionetmodelsplace)

> The model class of Place

VisibilityFunctionpublic**\_\_construct(***int* **$id**, *string* **$name**) : *void*
*Place constructor*public**getId()** : *int*
*Get the id of the place*public**getName()** : *string*
*Get the name of the place*---

### Class: \\takisrs\\Biblionet\\Models\\Language

[](#class-takisrsbiblionetmodelslanguage)

> The model class of Language

VisibilityFunctionpublic**\_\_construct(***int* **$id**, *string* **$name**) : *void*
*The language constructor*public**getId()** : *int*
*Get the id of the language*public**getName()** : *string*
*Get the name of the language*

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1926d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b642b4d69d305a94f122f45825651b893c5886c8e15cae212cdce5ffa2d4c56?d=identicon)[takisrs](/maintainers/takisrs)

---

Top Contributors

[![takisrs](https://avatars.githubusercontent.com/u/554714?v=4)](https://github.com/takisrs "takisrs (30 commits)")

---

Tags

Api Wrapperbooksbiblionet

### Embed Badge

![Health badge](/badges/takisrs-biblionet-api-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/takisrs-biblionet-api-wrapper/health.svg)](https://phpackages.com/packages/takisrs-biblionet-api-wrapper)
```

###  Alternatives

[fiveam-code/laravel-notion-api

Laravel Wrapper for the Notion API

435224.4k1](/packages/fiveam-code-laravel-notion-api)[marcreichel/igdb-laravel

A Laravel wrapper for version 4 of the IGDB API (Apicalypse) including webhook handling

115146.6k1](/packages/marcreichel-igdb-laravel)[webleit/zohobooksapi

Zoho Books API v3 - PHP SDK

4881.0k1](/packages/webleit-zohobooksapi)[otherguy/php-currency-api

A PHP API Wrapper to offer a unified programming interface for popular Currency Rate APIs.

2526.2k](/packages/otherguy-php-currency-api)[grok-php/client

Grok PHP Client is a robust and community-driven PHP client library for seamless integration with Grok AI API, offering efficient access to advanced AI and data processing capabilities.

325.9k4](/packages/grok-php-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
