softonic/download_stats_api_sdk

This package is abandoned and no longer maintained. No replacement package was suggested.

2.2.0 2020-01-15 12:33 UTC

README

To see the project documentation go to https://download-stats-api-v2.docs.softonic.io/

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 2.2.0
  • Package version: 1.21.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/softonic/download_stats_api_sdk.git"
    }
  ],
  "require": {
    "softonic/download_stats_api_sdk": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/DownloadStatsApiSdk/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: softonic
$config = Softonic\DownloadStatsApiSdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Softonic\DownloadStatsApiSdk\Api\DownloadStatsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | Download stats identifier

try {
    $result = $apiInstance->getDownloadStat($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DownloadStatsApi->getDownloadStat: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://localhost

Class Method HTTP request Description
DownloadStatsApi getDownloadStat GET /download-stats/{id} Retrieves the given downloads statistics
DownloadStatsApi getDownloadStats GET /download-stats Get the list of the downloads statistics for a given app
DownloadStatsApi postDownloadStats POST /download-stats Creates the downloads statistics for a given app
DownloadStatsApi putDownloadStats PUT /download-stats/{id} Replaces the given downloads statistics
ProgramsApi findProgram GET /programs Get the list of the downloads stats ordered by downloads
ProgramsApi getProgramPlatform GET /programs/{id_program}/platforms/{id_platform} Get the list of the downloads stats for a given program platform
ProgramsApi getProgramPlatformLanguage GET /programs/{id_program}/platforms/{id_platform}/languages/{id_language} Get the list of the downloads stats for a given program platform language

Documentation For Models

Documentation For Authorization

softonic

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • sft_download_stats_api.find.all: Find download stats
  • sft_download_stats_api.read.all: Read download stats
  • sft_download_stats_api.create.all: Create download stats
  • sft_download_stats_api.replace.all: Replace download stats

Author