softonic/web_setup_api_sdk

此包已被弃用且不再维护。未建议替代包。

1.2.0 2021-04-14 09:31 UTC

This package is auto-updated.

Last update: 2023-01-14 13:07:03 UTC


README

设置网站程序API

此PHP包由 Swagger Codegen 项目自动生成

  • API版本:1.0.0
  • 包版本:1.1.0
  • 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen

需求

PHP 5.5 及以上版本

安装 & 使用

Composer

要通过 Composer 安装绑定,请将以下内容添加到 composer.json

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

然后运行 composer install

手动安装

下载文件并包含 autoload.php

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

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门

请遵循 安装步骤,然后运行以下命令

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

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

$apiInstance = new Softonic\WebSetupApiSdk\Client\Api\ProgramsPlatformsLanguagesApi(
    // 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
);
$body = new \Softonic\WebSetupApiSdk\Client\Model\null(); //  | ProgramPlatformLanguage config to be created
$id_program = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Program identifier
$id_platform = "id_platform_example"; // string | Platform identifier

try {
    $result = $apiInstance->createProgramPlatformLanguage($body, $id_program, $id_platform);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgramsPlatformsLanguagesApi->createProgramPlatformLanguage: ', $e->getMessage(), PHP_EOL;
}

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

$apiInstance = new Softonic\WebSetupApiSdk\Client\Api\ProgramsPlatformsLanguagesApi(
    // 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_program = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Program identifier
$id_platform = "id_platform_example"; // string | Platform identifier
$id_language = "id_language_example"; // string | Language identifier

try {
    $result = $apiInstance->deleteProgramPlatformLanguage($id_program, $id_platform, $id_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgramsPlatformsLanguagesApi->deleteProgramPlatformLanguage: ', $e->getMessage(), PHP_EOL;
}

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

$apiInstance = new Softonic\WebSetupApiSdk\Client\Api\ProgramsPlatformsLanguagesApi(
    // 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_program = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Program identifier
$id_platform = "id_platform_example"; // string | Platform identifier

try {
    $result = $apiInstance->findProgramPlatformLanguage($id_program, $id_platform);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgramsPlatformsLanguagesApi->findProgramPlatformLanguage: ', $e->getMessage(), PHP_EOL;
}

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

$apiInstance = new Softonic\WebSetupApiSdk\Client\Api\ProgramsPlatformsLanguagesApi(
    // 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_program = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Program identifier
$id_platform = "id_platform_example"; // string | Platform identifier
$id_language = "id_language_example"; // string | Language identifier

try {
    $result = $apiInstance->readProgramPlatformLanguage($id_program, $id_platform, $id_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgramsPlatformsLanguagesApi->readProgramPlatformLanguage: ', $e->getMessage(), PHP_EOL;
}

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

$apiInstance = new Softonic\WebSetupApiSdk\Client\Api\ProgramsPlatformsLanguagesApi(
    // 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
);
$body = new \Softonic\WebSetupApiSdk\Client\Model\null(); //  | ProgramPlatformLanguage config to be replaced
$id_program = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Program identifier
$id_platform = "id_platform_example"; // string | Platform identifier
$id_language = "id_language_example"; // string | Language identifier

try {
    $result = $apiInstance->replaceProgramPlatformLanguage($body, $id_program, $id_platform, $id_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgramsPlatformsLanguagesApi->replaceProgramPlatformLanguage: ', $e->getMessage(), PHP_EOL;
}

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

$apiInstance = new Softonic\WebSetupApiSdk\Client\Api\ProgramsPlatformsLanguagesApi(
    // 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
);
$body = new \Softonic\WebSetupApiSdk\Client\Model\ProgramPlatformLanguage(); // \Softonic\WebSetupApiSdk\Client\Model\ProgramPlatformLanguage | ProgramPlatformLanguage config to be updated
$id_program = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // string | Program identifier
$id_platform = "id_platform_example"; // string | Platform identifier
$id_language = "id_language_example"; // string | Language identifier

try {
    $result = $apiInstance->updateProgramPlatformLanguage($body, $id_program, $id_platform, $id_language);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProgramsPlatformsLanguagesApi->updateProgramPlatformLanguage: ', $e->getMessage(), PHP_EOL;
}
?>

API端点文档

所有URI均相对于 web-setup-v1.sft.eu-west.sftapi.com

方法 HTTP请求 描述
ProgramsPlatformsLanguagesApi createProgramPlatformLanguage POST /programs/{id_program}/platforms/{id_platform}/languages 为特定平台和语言创建程序配置
ProgramsPlatformsLanguagesApi deleteProgramPlatformLanguage DELETE /programs/{id_program}/platforms/{id_platform}/languages/{id_language} 删除特定平台和语言的程序配置
ProgramsPlatformsLanguagesApi findProgramPlatformLanguage GET /programs/{id_program}/platforms/{id_platform}/languages 查找特定平台的程序配置(所有语言)
ProgramsPlatformsLanguagesApi readProgramPlatformLanguage GET /programs/{id_program}/platforms/{id_platform}/languages/{id_language} 读取特定平台和语言下的程序配置
ProgramsPlatformsLanguagesApi replaceProgramPlatformLanguage PUT /programs/{id_program}/platforms/{id_platform}/languages/{id_language} 替换特定平台和语言下的程序配置
ProgramsPlatformsLanguagesApi updateProgramPlatformLanguage PATCH /programs/{id_program}/platforms/{id_platform}/languages/{id_language} 更新特定平台和语言下的程序配置
SearchApi search POST /search 搜索列表过滤器并返回结果

模型文档

授权文档

softonic_auth

  • 类型: OAuth
  • 流程:应用程序
  • 授权URL:
  • 作用域:
  • ****:

作者

development@softonic.com