PHPackages                             websoftwares/avin - 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. websoftwares/avin

ActiveLibrary[API Development](/categories/api)

websoftwares/avin
=================

Avin, avin.cc api client

29PHP

Since Jul 30Pushed 12y agoCompare

[ Source](https://github.com/websoftwares/Avin)[ Packagist](https://packagist.org/packages/websoftwares/avin)[ RSS](/packages/websoftwares-avin/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Avin
====

[](#avin)

Client for interacting with the [avin.cc](http://www.avin.cc/api-documentation/ "avin.cc") JSON RESTful api.

[![Build Status](https://camo.githubusercontent.com/2e5e3b4290cc56be2bb56f146f1a73ae214096633854aea855970b3174768cc9/68747470733a2f2f6170692e7472617669732d63692e6f72672f776562736f667477617265732f4176696e2e706e67)](https://travis-ci.org/websoftwares/Avin)

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

[](#documentation)

We encourage you to read the [documentation](http://www.avin.cc/api-documentation/ "avin.cc") carefully before proceeding.

Api Key
-------

[](#api-key)

The AVIN API requires a developer key which you can ask avin.cc using this email address: .

Installing via Composer (recommended)
-------------------------------------

[](#installing-via-composer-recommended)

Install composer in your project:

```
curl -s http://getcomposer.org/installer | php

```

Create a composer.json file in your project root:

```
{
    "require": {
        "websoftwares/avin": "dev-master"
    }
}

```

Install via composer

```
php composer.phar install

```

Usage
-----

[](#usage)

Below u find a list with available methods.

GetWineByAvin
-------------

[](#getwinebyavin)

Gets a wine by Avin.

```
use Websoftwares\AvinClient, Websoftwares\Avin;

$avin = new Avin(new AvinClient('123456789YourApiKey'));
$avin->GetWineByAvin('AVIN0123456789012');
```

GetWinesByName
--------------

[](#getwinesbyname)

Gets wine by name.

```
use Websoftwares\AvinClient, Websoftwares\Avin;

$avin = new Avin(new AvinClient('123456789YourApiKey'));
$avin->GetWinesByName('Era');
```

GetCountries
------------

[](#getcountries)

Gets a list of countries.

```
use Websoftwares\AvinClient, Websoftwares\Avin;

$avin = new Avin(new AvinClient('123456789YourApiKey'));
$avin->GetCountries();
```

GetWineTypes
------------

[](#getwinetypes)

Gets a list of wine types.

```
use Websoftwares\AvinClient, Websoftwares\Avin;

$avin = new Avin(new AvinClient('123456789YourApiKey'));
$avin->GetWineTypes();
```

GetProducerByID
---------------

[](#getproducerbyid)

Gets a producer by id.

```
use Websoftwares\AvinClient, Websoftwares\Avin;

$avin = new Avin(new AvinClient('123456789YourApiKey'));
$avin->GetProducerByID(12345);
```

GetProducerByName
-----------------

[](#getproducerbyname)

Gets a producer by name.

```
use Websoftwares\AvinClient, Websoftwares\Avin;

$avin = new Avin(new AvinClient('123456789YourApiKey'));
$avin->GetProducerByName('Producer sample name');
```

setFilter
---------

[](#setfilter)

Please read the [documentation](http://www.avin.cc/api-documentation/ "avin.cc") for a complete list of available filters.

```
use Websoftwares\AvinClient, Websoftwares\Avin;

$avin = new Avin(new AvinClient('123456789YourApiKey'));

$avin
	->setFilter('vintage', 2003)
    ->setFilter('country', 620)
    ->setFilter('type', '1')
    ->setFilter('producer', 'Cortes de Cima')
    ->GetWineByAvin('AVIN6452997073019');
```

Error messages
--------------

[](#error-messages)

Use try/catch block to get error messages.

```
use Websoftwares\AvinClient,
	Websoftwares\Avin,
	Websoftwares\AvinException;

try {
	$avin = new Avin(new AvinClient('123456789YourApiKey'));
	$avin->GetWinesByName('Era');
} catch (AvinException $e) {
	echo $e->getMessage();
}
```

Testing
-------

[](#testing)

In the tests folder u can find several tests for online and offline.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b876616b4c499f67211e285aed4b04f5ac44f436b553353389a951b2f60e6397?d=identicon)[Websoftwares](/maintainers/Websoftwares)

---

Top Contributors

[![BorisSimoni](https://avatars.githubusercontent.com/u/1969775?v=4)](https://github.com/BorisSimoni "BorisSimoni (3 commits)")[![websoftwares](https://avatars.githubusercontent.com/u/946561?v=4)](https://github.com/websoftwares "websoftwares (1 commits)")

### Embed Badge

![Health badge](/badges/websoftwares-avin/health.svg)

```
[![Health](https://phpackages.com/badges/websoftwares-avin/health.svg)](https://phpackages.com/packages/websoftwares-avin)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M19](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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