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 3w ago

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 52% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

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

1985d 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

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M971](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)

PHPackages © 2026

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