PHPackages                             zamnuts/ean-api-client - 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. zamnuts/ean-api-client

ActiveLibrary[API Development](/categories/api)

zamnuts/ean-api-client
======================

Expedia Affiliate Network API Client

1.0.0(10y ago)71311BSD-3-ClausePHP

Since Oct 15Pushed 10y ago2 watchersCompare

[ Source](https://github.com/zamnuts/ean-api-client)[ Packagist](https://packagist.org/packages/zamnuts/ean-api-client)[ RSS](/packages/zamnuts-ean-api-client/feed)WikiDiscussions master Synced 1mo ago

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

Expedia Affiliate Network API Client
====================================

[](#expedia-affiliate-network-api-client)

This is a comprehensive library for working with v3 r27 of the EAN API. An affiliate account is required to actually use any of this successfully (even in developer mode). Read more about it in the [EAN Developer Documentation](http://developer.ean.com/docs/). This structured library attempts to provide precise request and response parameters for each query type. This is especially helpful when code-hinting is available via an IDE of some sort; it should speed up integration and leave out guess-work during maintenance.

Current State of This Lib
-------------------------

[](#current-state-of-this-lib)

Not going to lie here... it is in need of a good inventory and audit. At the time of this writing, this has been sitting on the shelf collecting dust for a while now.

- It was at one point successfully functioning in a production environment.
- The phpdocs are mostly complete for public members.
- *Most*, but not all, request/response types are accounted for; one that I know of that is incomplete is `LocationInfoRequest` within [Geo Functions](http://developer.ean.com/docs/geo-functions) (just b/c the project this was intended for didn't use it), but the rest should be functional.
- No unit tests exist whatsoever, oops. Written tests with stubs and fixtures would be nice, yes?
- Some of the "behind-the-scenes" methods are half baked; the original intention was for two-way request/response processing and rendering. This never came to fruition, but there are remnants, and some of them work.
- Only supports r27 of the API, while the latest at the time of this writing is v30.

Usage and Examples
------------------

[](#usage-and-examples)

See `examples/*.php` for hotel list search example and general usage.

To get started, you'll need an EAN API key and secret. Only one `EANConfig` and `EANFacade` is required at a time. `EANConfig` is used as a model to feed the API configuration into `EANFacade`. `EANFacade` applies the general configurations to each query request, e.g. `EANFacade->query(EANAbstractQuery)`. Anything in `EANAPIClient\Query`can be instantiated and passed into the facade's query method, at which point the `response` property of the `EANAbstractQuery` object will contain the results. Any instance of `EANAbstractQuery` is stateful, so if repeat and/or subsequent queries must be performed (especially of the same type), a new one should be instantiated, and then passed into the same `EANFacade` instance's `query` method.

Ping Example

```
use zamnuts\EANAPIClient\EANFacade;
use zamnuts\EANAPIClient\EANConfig;
use zamnuts\EANAPIClient\Query\EANPing;

// need session ID for EAN API, this can technically be anything, but this is best practice
session_start();

// config for EANFacade
$config = new EANConfig();
$config->apiKey		= ''; // CHANGEME
$config->apiSecret	= ''; // CHANGEME
$config->cid		= 0; // CHANGEME
$config->sessionId	= session_id(); // this happens automatically, but just for example
$config->devMode	= true; // switch to "false" in prod

// this is the gateway into the EAN API, all query structures are executed through this profile
$ean = new EANFacade($config); // just need one of these for all queries to use

$ping = new EANPing();
$ping->echo = 'Hello World'; // send this data
$ean->query($ping);

// due to the nature of the EAN API's ping request,
// the "echo" parameter should be the same in the response as the request
echo $ping->response->echo."\n"; // got this data back

echo ($ping->response->echo === $ping->echo ? 'MATCH' : 'INVALID')."\n";
```

Will output:

```
Hello World
MATCH

```

License
-------

[](#license)

BSD-3-Clause, see `LICENSE` file for full text. (c) 2015 Andrew Zammit

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

3868d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/85bf9fb7517373d221ca99fa14aa7f5f3305beeda00825c9a1cb28008a2504c8?d=identicon)[zamnuts](/maintainers/zamnuts)

---

Tags

apiclienteanexpediahotel

### Embed Badge

![Health badge](/badges/zamnuts-ean-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/zamnuts-ean-api-client/health.svg)](https://phpackages.com/packages/zamnuts-ean-api-client)
```

###  Alternatives

[deepseek-php/deepseek-php-client

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

47073.9k5](/packages/deepseek-php-deepseek-php-client)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)

PHPackages © 2026

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