PHPackages                             ludicat/mtg-finder-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ludicat/mtg-finder-sdk

ActiveProject[Utility &amp; Helpers](/categories/utility)

ludicat/mtg-finder-sdk
======================

00PHP

Since Apr 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Ludicat/mtg-finder-sdk)[ Packagist](https://packagist.org/packages/ludicat/mtg-finder-sdk)[ RSS](/packages/ludicat-mtg-finder-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

MTG Finder SDK
==============

[](#mtg-finder-sdk)

This is a PHP SDK for the MTG Finder API. It provides a simple way to interact with the API.

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

[](#installation)

You can install the package via composer:

```
composer require ludicat/mtg-finder-sdk
```

Usage
-----

[](#usage)

Create an API key in your account settings on the [MTG Finder website](https://www.mtg-finder.org/api_key/create#/). You can find a detailled documentation on the [MTG Finder API documentation](https://www.mtg-finder.org/api/doc).

You have to instantiate a client. It will be passed through any API endpoint.

```
use Ludicat\MTGFinder\Client;

$client = new Client('YOUR_API_KEY');
```

Endpoints
---------

[](#endpoints)

### Formats

[](#formats)

You have to set the formats on an event. In order to do, you'll have to use their ID. You can get a complete id list (along with their names) by using the `get` method on the `Formats` endpoint.

```
use Ludicat\MTGFinder\Api\Formats;

$formatsApi = new Formats($client);
/** @var array $availableFormats */
$availableFormats = $formatsApi->get();
```

### Geoname

[](#geoname)

MTG Finder uses the Geoname API to get the list of countries. You can get on by ID or search for by city name, zipcode or GPS coordinates on the `Geoname` endpoint.

```
use Ludicat\MTGFinder\Api\Geoname;

$geonameApi = new Geoname($client);
/** @var Ludicat\MTGFinder\Model\Geoname|null $data */
$data = $geonameApi->get(123);
/** @var array $data */
$data = $geonameApi->search('FR', 'Paris'); // Could either be a city name or a zipcode
/** @var array $data */
$data = $geonameApi->searchZip('FR', '75001');
/** @var array $data */
$data = $geonameApi->searchCity('FR', 'Paris');
/** @var Ludicat\MTGFinder\Model\Geoname|null $data */
$data = $geonameApi->searchCoord(42.5833, 1.6667);
```

### Events

[](#events)

The main purpose of the API is to sync your website and create an event automatically. We recommand you to get your formats and geonames before creating an event.

```
use Ludicat\MTGFinder\Api\Event;
use Ludicat\MTGFinder\Model\Event as EventModel;

$eventApi = new Event($client);
$eventApi->create([
    'state' => EventModel::STATE_PUBLISHED,
    'name' => 'Test event',
    'description' => 'This is a test event',
    'formats' => [
        ['id' => 1],
        ['id' => 2],
        ['id' => 5],
    ],
    'address' => [
        'street' => '1, street of the test',
        'additional' => 'Appartement 42',
        'name' => 'The bar next door',
        'geoname' => [
            'id' => 123
        ],
        'latitude' => 48.8566,
        'longitude' => 2.3522,
    ],
    'maxPeople' => 16,
    'startAt' => '2024-01-01 19:00:00',
    'endAt' => '2024-01-01 23:00:00',
    'publication' => 'Check my new tournament !',
]);
```

Testing
-------

[](#testing)

You have to create the docker environment before running the tests.

```
make build
make test
```

Troubleshooting
---------------

[](#troubleshooting)

If you encounter any issue, please create an issue on the repository:

Remember that any abuse of the API will result in a ban of your account.

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/19ed41f54971ca2c9a6d2cd25178b46b7d38164bc8a16b046dc0556c5871d991?d=identicon)[Jihel](/maintainers/Jihel)

---

Top Contributors

[![Jihell](https://avatars.githubusercontent.com/u/3269035?v=4)](https://github.com/Jihell "Jihell (1 commits)")

### Embed Badge

![Health badge](/badges/ludicat-mtg-finder-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/ludicat-mtg-finder-sdk/health.svg)](https://phpackages.com/packages/ludicat-mtg-finder-sdk)
```

PHPackages © 2026

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