{"id":18578158,"url":"https://github.com/bilaleren/tune-php","last_synced_at":"2026-01-27T11:03:49.628Z","repository":{"id":62494197,"uuid":"323936634","full_name":"bilaleren/tune-php","owner":"bilaleren","description":"TUNE makes the industry’s most flexible SaaS platform for managing marketing partnerships across mobile and web.","archived":false,"fork":false,"pushed_at":"2024-09-03T11:23:04.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-29T14:36:29.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bilaleren.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-23T15:25:47.000Z","updated_at":"2024-09-03T11:23:08.000Z","dependencies_parsed_at":"2025-05-26T09:27:49.033Z","dependency_job_id":null,"html_url":"https://github.com/bilaleren/tune-php","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bilaleren/tune-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilaleren%2Ftune-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilaleren%2Ftune-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilaleren%2Ftune-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilaleren%2Ftune-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bilaleren","download_url":"https://codeload.github.com/bilaleren/tune-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilaleren%2Ftune-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T23:33:49.948Z","updated_at":"2026-01-27T11:03:49.606Z","avatar_url":"https://github.com/bilaleren.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TUNE APIs\n\nTUNE 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.\n\n## Installation\n\n```\ncomposer require bilaleren/tune-api\n```\n\n## Setup\n\n```php\nuse Tune\\Networks;\nuse Tune\\AffiliateApi;\nuse Tune\\Utils\\Network;\nuse Tune\\Repository\\NetworkRepository;\n\n$networks = new Networks([\n    new Network('api_key_1', 'network_id_1'), // Auto selected network\n    new Network('api_key_2', 'network_id_2')\n]);\n\nclass CustomNetwork implements NetworkRepository \n{\n\n    /**\n     * @inheritDoc\n     */\n    public function name(): string\n    {\n        return $this-\u003enetworkId();\n    }\n\n    /**\n     * @inheritDoc\n     */\n    public function apiKey(): string\n    {\n        return 'api_key_3';\n    }\n\n    /**\n     * @inheritDoc\n     */\n    public function networkId(): string\n    {\n        return 'network_id_3';\n    }\n\n    /**\n     * @inheritDoc\n     */\n    public function requestOptions(): array\n    {\n        return [];\n    }\n    \n}\n\n$networks-\u003eregisterNetwork(new CustomNetwork(), false);\n\n$affiliateApi = new AffiliateApi($networks);\n\n$affiliateApi-\u003enetworks-\u003eswitchToNetwork('network_id_3');\n```\n\n### Network API - [Docs](https://developers.tune.com/network/)\n\nAllows network owners to manage all aspects of their networks programmatically and outside of the application itself.\n\n#### Example\n\n```php\nuse Tune\\Tune;\nuse Tune\\Networks;\nuse Tune\\NetworkApi;\n\n$tuneNetworkApi = new NetworkApi($networks = new Networks());\n// 0r\n$tuneNetworkApi = Tune::networkApi($networks);\n```\n\n### Affiliate API - [Docs](https://developers.tune.com/affiliate/)\n\nAllows affiliates of network owners to retrieve and manage data in TUNE programmatically.\n\n#### Example\n\n```php\nuse Tune\\Tune;\nuse Tune\\Networks;\nuse Tune\\AffiliateApi;\n\n$tuneAffiliateApi = new AffiliateApi($networks = new Networks());\n// 0r\n$tuneAffiliateApi = Tune::affiliateApi($networks);\n```\n\n### Advertiser API - [Docs](https://developers.tune.com/advertiser/)\n\nAllows advertisers working with network owners to retrieve data from TUNE.\n\n#### Example\n\n```php\nuse Tune\\Tune;\nuse Tune\\Networks;\nuse Tune\\AdvertiserApi;\n\n$tuneAdvertiserApi = new AdvertiserApi($networks = new Networks());\n// 0r\n$tuneAdvertiserApi = Tune::advertiserApi($networks);\n```\n\n### API Call Example\n\n```php\nuse Tune\\Networks;\nuse Tune\\AffiliateApi;\nuse Tune\\Utils\\Operator;\nuse Tune\\Utils\\HttpQueryBuilder;\n\n$affiliateApi = new AffiliateApi(new Networks());\n\nprint_r($affiliateApi-\u003ereport()-\u003egetConversions(function (HttpQueryBuilder $builder) {\n    return $builder-\u003esetFields([\n        'Browser.id',\n        'Browser.display_name',\n        'OfferUrl.preview_url',\n        'Offer.name'\n    ])-\u003eaddFilter('Stat.datetime', [\n        '2019-12-19 00:00:00',\n        '2020-12-19 00:00:00'\n    ], null, Operator::BETWEEN);\n}, /* Request options */ []));\n\n// Or \n\nprint_r($affiliateApi-\u003ereport()-\u003egetConversions([\n    'filters' =\u003e [\n        'Stat.datetime' =\u003e [\n            'conditional' =\u003e Operator::BETWEEN,\n            'values' =\u003e [\n                '2019-12-19 00:00:00',\n                '2020-12-19 00:00:00'\n            ]\n        ]\n    ],\n    'fields' =\u003e [\n        'Browser.id',\n        'Browser.display_name',\n        'OfferUrl.preview_url',\n        'Offer.name'\n    ]\n], /* Request options */ []));\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilaleren%2Ftune-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilaleren%2Ftune-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilaleren%2Ftune-php/lists"}