Skip to content

Latest commit

 

History

History
143 lines (100 loc) · 5.06 KB

BrandApi.md

File metadata and controls

143 lines (100 loc) · 5.06 KB

AkeneoPresales\DescrbAPI\BrandApi

All URIs are relative to https://app.descrb.com.

Method HTTP request Description
createBrandAdApiV1BrandPost() POST /api/v1/brand/ Create Brand Ad
reviewBrandDescriptionApiV1BrandBrandDescriptionIdReviewPost() POST /api/v1/brand/{brand_description_id}/review Review Brand Description

createBrandAdApiV1BrandPost()

createBrandAdApiV1BrandPost($image, $photo_url, $brand_name, $length, $language, $data_language, $language_style): mixed

Create Brand Ad

Create new ad

Example

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


// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
$config = AkeneoPresales\DescrbAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new AkeneoPresales\DescrbAPI\Api\BrandApi(
    // 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
);
$image = "/path/to/file.txt"; // \SplFileObject | Image File
$photo_url = ''; // string | Photo URL
$brand_name = ''; // string | Product Name
$length = 512; // int | Numer of Tokens
$language = 'pl'; // string | Supported languages: en,de,fr,es,ro,pl
$data_language = ''; // string | Data Source Language
$language_style = 'Neutral'; // string | Choose between Neutral, Casual, Specialist

try {
    $result = $apiInstance->createBrandAdApiV1BrandPost($image, $photo_url, $brand_name, $length, $language, $data_language, $language_style);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BrandApi->createBrandAdApiV1BrandPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
image \SplFileObject**\SplFileObject** Image File [optional]
photo_url string Photo URL [optional] [default to '']
brand_name string Product Name [optional] [default to '']
length int Numer of Tokens [optional] [default to 512]
language string Supported languages: en,de,fr,es,ro,pl [optional] [default to 'pl']
data_language string Data Source Language [optional] [default to '']
language_style string Choose between Neutral, Casual, Specialist [optional] [default to 'Neutral']

Return type

mixed

Authorization

OAuth2PasswordBearer

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

reviewBrandDescriptionApiV1BrandBrandDescriptionIdReviewPost()

reviewBrandDescriptionApiV1BrandBrandDescriptionIdReviewPost($brand_description_id, $brand_description_update): \AkeneoPresales\DescrbAPI\Model\BrandDescriptionUpdate

Review Brand Description

Get description by ID.

Example

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


// Configure OAuth2 access token for authorization: OAuth2PasswordBearer
$config = AkeneoPresales\DescrbAPI\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new AkeneoPresales\DescrbAPI\Api\BrandApi(
    // 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
);
$brand_description_id = 'brand_description_id_example'; // string
$brand_description_update = new \AkeneoPresales\DescrbAPI\Model\BrandDescriptionUpdate(); // \AkeneoPresales\DescrbAPI\Model\BrandDescriptionUpdate

try {
    $result = $apiInstance->reviewBrandDescriptionApiV1BrandBrandDescriptionIdReviewPost($brand_description_id, $brand_description_update);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BrandApi->reviewBrandDescriptionApiV1BrandBrandDescriptionIdReviewPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
brand_description_id string
brand_description_update \AkeneoPresales\DescrbAPI\Model\BrandDescriptionUpdate

Return type

\AkeneoPresales\DescrbAPI\Model\BrandDescriptionUpdate

Authorization

OAuth2PasswordBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]