softonic / sdk_user-ratings-api
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2023-01-09 22:23:29 UTC
README
To access the API: 1. Register a client with the proper permissions (user-ratings-api.*
) in the Softonic OAuth Admin 1. Retrieve a token for that client with the proper scopes from the Softonic OAuth API. 1. Copy the token in the input field at the top of the page
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.17.0
- Package version: 1.0.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/sdk_user-ratings-api.git"
}
],
"require": {
"softonic/sdk_user-ratings-api": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/UserRatingsApiSdk/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'); $apiInstance = new Softonic\UserRatingsApiSdk\Api\AppsApi( // 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() ); $app_id = "app_id_example"; // string | App id $app_user_rating = new \Softonic\UserRatingsApiSdk\Client\Model\AppUserRating(); // \Softonic\UserRatingsApiSdk\Client\Model\AppUserRating | try { $apiInstance->createAppUserRating($app_id, $app_user_rating); } catch (Exception $e) { echo 'Exception when calling AppsApi->createAppUserRating: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
AppsApi | createAppUserRating | POST /apps/{appId}/user-ratings | Register a rating for the given app |
AppsApi | getAppUserRatings | GET /apps/{appId}/user-ratings | Get the rating information about the given app |
AppsApi | getAverageAppUserRatings | GET /apps/user-ratings | Get a list of apps with their average user ratings and number of votes |
Documentation For Models
Documentation For Authorization
All endpoints do not require authorization.