ced_test1/mirakl-sdk

此包最新版本(dev-master)没有可用的许可证信息。

未提供描述(由Openapi Generator生成 https://github.com/openapitools/openapi-generator)

dev-master 2023-03-17 09:38 UTC

This package is not auto-updated.

Last update: 2024-09-28 16:57:08 UTC


README

未提供描述(由Openapi Generator生成 https://github.com/openapitools/openapi-generator

安装与使用

需求

PHP 7.4 及以上版本。也应与 PHP 8.0 兼容。

Composer

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

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

然后运行 composer install

手动安装

下载文件并包含 autoload.php

<?php
require_once('/path/to/Ced-mirakl/vendor/autoload.php');

入门

请遵循安装流程,然后运行以下命令

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



// Configure Bearer (JWT) authorization: Bearer
$config = Ced\MiraklApi\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Ced\MiraklApi\Api\CatalogApi(
    // 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
);
$upsert_products_request = new \Ced\MiraklApi\Model\UpsertProductsRequest(); // \Ced\MiraklApi\Model\UpsertProductsRequest

try {
    $apiInstance->upsertProducts($upsert_products_request);
} catch (Exception $e) {
    echo 'Exception when calling CatalogApi->upsertProducts: ', $e->getMessage(), PHP_EOL;
}

API 端点

所有 URI 都是相对于 https://miraklconnect.com/api

模型

授权

Bearer

  • 类型: Bearer 认证(JWT)

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

关于此包

此 PHP 包由OpenAPI Generator项目自动生成

  • API 版本:afcae4e6-28a6-4477-a8ed-d78442ed50d5
  • 构建包:org.openapitools.codegen.languages.PhpClientCodegen