PHPackages                             bilaleren/tune-api - 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. bilaleren/tune-api

ActiveLibrary[API Development](/categories/api)

bilaleren/tune-api
==================

TUNE makes the industry’s most flexible SaaS platform for managing marketing partnerships across mobile and web.

v1.0.3(5y ago)07781MITPHPPHP &gt;=7.1

Since Dec 23Pushed 1y ago2 watchersCompare

[ Source](https://github.com/bilaleren/tune-php)[ Packagist](https://packagist.org/packages/bilaleren/tune-api)[ Docs](https://github.com/bilaleren/tune-php.git)[ RSS](/packages/bilaleren-tune-api/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (5)Used By (0)

TUNE APIs
=========

[](#tune-apis)

TUNE makes the industry’s most flexible SaaS platform for managing marketing partnerships across mobile and web. On one platform, you can maximize ROI from onboarding through payout with your most important partners — affiliates, networks, influencers, agencies, and any other business development relationships.

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

[](#installation)

```
composer require bilaleren/tune-api

```

Setup
-----

[](#setup)

```
use Tune\Networks;
use Tune\AffiliateApi;
use Tune\Utils\Network;
use Tune\Repository\NetworkRepository;

$networks = new Networks([
    new Network('api_key_1', 'network_id_1'), // Auto selected network
    new Network('api_key_2', 'network_id_2')
]);

class CustomNetwork implements NetworkRepository
{

    /**
     * @inheritDoc
     */
    public function name(): string
    {
        return $this->networkId();
    }

    /**
     * @inheritDoc
     */
    public function apiKey(): string
    {
        return 'api_key_3';
    }

    /**
     * @inheritDoc
     */
    public function networkId(): string
    {
        return 'network_id_3';
    }

    /**
     * @inheritDoc
     */
    public function requestOptions(): array
    {
        return [];
    }

}

$networks->registerNetwork(new CustomNetwork(), false);

$affiliateApi = new AffiliateApi($networks);

$affiliateApi->networks->switchToNetwork('network_id_3');
```

### Network API - [Docs](https://developers.tune.com/network/)

[](#network-api---docs)

Allows network owners to manage all aspects of their networks programmatically and outside of the application itself.

#### Example

[](#example)

```
use Tune\Tune;
use Tune\Networks;
use Tune\NetworkApi;

$tuneNetworkApi = new NetworkApi($networks = new Networks());
// 0r
$tuneNetworkApi = Tune::networkApi($networks);
```

### Affiliate API - [Docs](https://developers.tune.com/affiliate/)

[](#affiliate-api---docs)

Allows affiliates of network owners to retrieve and manage data in TUNE programmatically.

#### Example

[](#example-1)

```
use Tune\Tune;
use Tune\Networks;
use Tune\AffiliateApi;

$tuneAffiliateApi = new AffiliateApi($networks = new Networks());
// 0r
$tuneAffiliateApi = Tune::affiliateApi($networks);
```

### Advertiser API - [Docs](https://developers.tune.com/advertiser/)

[](#advertiser-api---docs)

Allows advertisers working with network owners to retrieve data from TUNE.

#### Example

[](#example-2)

```
use Tune\Tune;
use Tune\Networks;
use Tune\AdvertiserApi;

$tuneAdvertiserApi = new AdvertiserApi($networks = new Networks());
// 0r
$tuneAdvertiserApi = Tune::advertiserApi($networks);
```

### API Call Example

[](#api-call-example)

```
use Tune\Networks;
use Tune\AffiliateApi;
use Tune\Utils\Operator;
use Tune\Utils\HttpQueryBuilder;

$affiliateApi = new AffiliateApi(new Networks());

print_r($affiliateApi->report()->getConversions(function (HttpQueryBuilder $builder) {
    return $builder->setFields([
        'Browser.id',
        'Browser.display_name',
        'OfferUrl.preview_url',
        'Offer.name'
    ])->addFilter('Stat.datetime', [
        '2019-12-19 00:00:00',
        '2020-12-19 00:00:00'
    ], null, Operator::BETWEEN);
}, /* Request options */ []));

// Or

print_r($affiliateApi->report()->getConversions([
    'filters' => [
        'Stat.datetime' => [
            'conditional' => Operator::BETWEEN,
            'values' => [
                '2019-12-19 00:00:00',
                '2020-12-19 00:00:00'
            ]
        ]
    ],
    'fields' => [
        'Browser.id',
        'Browser.display_name',
        'OfferUrl.preview_url',
        'Offer.name'
    ]
], /* Request options */ []));
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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

Every ~10 days

Total

4

Last Release

1930d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/777c318b28a6be9845f925aa3916d3c1d6c09a53d454ffb5fb43a1c3170e17ba?d=identicon)[bilaleren](/maintainers/bilaleren)

---

Top Contributors

[![bilaleren](https://avatars.githubusercontent.com/u/48865064?v=4)](https://github.com/bilaleren "bilaleren (7 commits)")

---

Tags

Affiliate Marketingtunenetwork marketingTune Api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bilaleren-tune-api/health.svg)

```
[![Health](https://phpackages.com/badges/bilaleren-tune-api/health.svg)](https://phpackages.com/packages/bilaleren-tune-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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