adobe/stock-api-libphp

Name: stock-api-libphp

Owner: Adobe Systems Incorporated

Description: PHP implementation of the Stock APIs

Created: 2018-02-27 23:06:41.0

Updated: 2018-03-16 21:51:20.0

Pushed: 2018-05-24 03:12:19.0

Homepage:

Size: 3432

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Stock API libphp

Overview

This is a PHP implementation of the various APIs provided by the Stock services.

Getting Started

This is a composer project. Following steps are needed for getting started with this project:

Setup

Run composer install --no-dev for installing the required libraries. If you plan to do some developement, then remove the --no-dev option

Tests

Run composer run check for linting and testcases. Run composer run test-coverage for test coverage.

The above command will by default run the linting, test cases and the code coverage along with building the project. The linting results will be shown within the console output itself and if there are any issues the build will stop and fail instantly. If there are no linting issues found, the build will continue to build the project. It will also generate the detailed coverage reports for you.

Running Test Suites

However, the composer run check will run the tests automatically but if you need to run the tests separately, please run the below command in console -

poser run test`
Coverage

Just run the composer run test-coverage as mentioned above, it should generate the coverage reports along with the test results and building the project. As mentioned above coverage reports can be found at <project directory>/data/clover/index.html

Integration Guide

To start using PHP SDK, you need to add PHPSDK-[version] into your project build path. You can download the source code and compile locally with composer command as mentioned in the Getting Started section above to generate the latest PHPSDK-[version].

When you build the project, you will find the dependency in the vendor folder. If these are not already in your environment, you'll need to add them to your build path. Below is the list of dependent jars -

Usage
AdobeStock

In order to use the Stock APIs, one must initialize AdobeStock by passing config values like ApiKey, Product, environment which in turn initializes stock Config.

$client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', new Http());

|Environment|Description| |—|—| |STAGE|Uses internal staging environment.Mainly used for testing purposes| |PROD|Used in development purposes.|

Accessing SearchFiles
SearchFiles

AdobeStock class will allow you to access the Search/Files Stock Api. You can query Adobe Stock for assets that meet your specified search criteria. You can construct the SearchFilesRequest object to set filters, sort order, set search keywords etc. for the Search/Files api.

First, You have to call searchFilesInitialize to initialize search files which will gives you adobe stock object from where you can call getNextResponse, getPreviousResponse etc. to fetch the results. The AdobeStock provides paginated interface which allows you to call its methods (for e.g. getNextResponse, getPreviousResponse etc.) multiple times to retrieve the subsequent search results in order. It maintains the current state of searchFiles request and initially, the state is pointing invalid search files results. As soon as, the getNextReponse method is called, it makes Search/Files api call and returns the results with SearchFilesReponse object. The getNextResponse moves the state to next page and fetch the response for the same. Similarly, the getPreviousResponse and getResponsePage methods can be used to move one page behind and skip to a particular search page index respectively.

Instantiation

You can construct the object of this class with below arguments -

Example

Sample code to initialize the SearchFiles Api -

    $results_columns = Constants::getResultColumns();
    $search_params = new SearchParameters();
    $search_params->setWords('tree')->setLimit(3)->setOffset(0);

    $result_column_array = [
        $results_columns['NB_RESULTS'],
        $results_columns['COUNTRY_NAME'],
        $results_columns['ID'],
    ];

    $request = new SearchFilesRequest();
    $request->setLocale('En_US');
    $request->setSearchParams($search_params);
    $request->setResultColumns($result_column_array);

    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $response = $this->_adobe_stock_client->searchFilesInitialize($request, '');

More examples can be found at the end of this document.

Methods SearchFilesRequest

In order to make SearchFiles API call, you need to create a SearchFileRequest object to define the search criterion for search files results. You can set the various search parameters, locale and required result columns supported by Stock Search/Files api here.

Here is the mapping of Search/Files api query parameters with the setters methods that you can use to set the corresponding parameters in PHP Stock SDK -

|API URL Query Parameter| Setter Methods in SearchFilesRequest |Description| |—|—|—| |locale|setLocale|Sets location language code. For e.g. “en-US”, “fr-FR” etc.| |search_parameters[*]|setSearchParams|Sets An object of SearchParameters where one can set all supported search_parameters| |similar_image|setSimilarImage| Sets an image data for visual similarity search. It will only be considered if similar image in SearchParameters is set to true. | |result_columns[]| setResultColumns | Allows to set the list of result columns required in the search results. If you are not setting result columns, it will set all default columns in result_column array at api level. For more details, read Result Columns section below.|

SearchParameters

SearchParameters allows to set the various search_parameters (URL query parameters) supported by Search/Files Stock api. This is the class where you can actually set the search keywords, limit, sort order, filters, media_id etc.

Mapping of query parameter search_parameters[*] with SearchParameters class setter methods -

|Search Parameter| Setter Methods | Description| |—|—|—| |search_parameters[words]|setWords|Allows to set the key words that you want to search| |search_parameters[limit]|setLimit|Allows to set maximum number of assets to return in the call.| |search_parameters[offset]|setOffset|Allows to set the start position in search results. | |search_parameters[order]|setOrder|Allows to set sorting order in which it will return found assets| |search_parameters[creator_id]|setCreatorId|Allows to search by a specific asset creator's ID| |search_parameters[media_id]|setMediaId|Allows to search for one specific asset by its unique identifier (media_id)| |search_parameters[model_id]|setModelId|Allows to search for assets that portray a specific person (model) using the model's ID| |search_parameters[serie_id]|setSerieId|Allows to search for assets in the specified series using the series ID| |search_parameters[gallery_id]|setGalleryId|Allows to search with a specific galleryId filter| |search_parameters[similar]|setSimilar|Allows to search for assets that are similar in appearance to an asset with a specific media ID| |search_parameters[similar_url]|setSimilarURL|Allows to search for assets that are similar in appearance to an image at a specific URL| |search_parameters[category]|setCategory|Allows to search for assets with a specific category ID| |search_parameters[thumbnail_size]|setThumbnailSize|Allows to set the size of thumbnail(in pixels) to return for each found asset| |search_parameters[filters][area_pixels]|setFilterAreaPixels|Allows to set image sizes in pixels for returned assets| |search_parameters[filters][3d_type_id][]|setFilter3DTypeIds|Allows to set array specifying which 3D types to return| |search_parameters[filters][template_type_id][]|setFilterTemplateTypes |Allows to set array specifying which template types to return| |search_parameters[filters][template_category_id][]|setFilterTemplateCategoryIds|Allows to set array specifying which template categories to return| |search_parameters[filters][has_releases]|setFilterHasReleases|Allows to return only that assets which has model or property releases| |search_parameters[filters][content_type:photo]|setFilterContentTypePhoto|Allows to include found assets that are photos| |search_parameters[filters][content_type:illustration]|setFilterContentTypeIllustration|Allows to include found assets that are illustrations| |search_parameters[filters][content_type:vector]|setFilterContentTypeVector|Allows to include found assets that are vectors| |search_parameters[filters][content_type:video]|setFilterContentTypeVideo|Allows to include found assets that are videos| |search_parameters[filters][content_type:3d]|setFilterContentType3D|Allows to include found assets that are 3D items| |search_parameters[similar_image]|setSimilarImage|Allows to set whether to use similar_image data for visual similarity search| |search_parameters[filters][content_type:all]|setFilterContentTypeAll|Allows to include found assets of all content_types| |search_parameters[filters][offensive:2]|setFilterOffensive2|Allows to return found assets only if they are flagged as including Explicit/Nudity/Violence| |search_parameters[filters][isolated:on]|setFilterIsolatedOn|Allows to return found assets only if the subject is isolated from the background by being on a uniformly colored background| |search_parameters[filters][panoramic:on]|setFilterPanoromicOn|Allows to return found assets only if they are panoramic| |search_parameters[filters][orientation]|setFilterOrientation|Allows to return found assets of the specified orientation| |search_parameters[filters][age]|setFilterAge|Allows to return found assets of the specified age| |search_parameters[filters][video_duration]|setFilterVideoDuration|Alows to return videos whose duration is no longer than the specified duration in seconds| |search_parameters[filters][Premium]|setPremium|Allows to return found assets with premium (pricing) level| |search_parameters[filters][colors]|setFilterColors|Allows to return only found assets that contain the specified colors| |search_parameters[filters][Editorial]|setFilterEditorial|Allows to return only found assets that are editorial| |search_parameters[filters][content_type:template]|setFilterContentTypeTemplate|Allows to include found assets that are of template types|

Result Columns

You can create array of ResultColumn enums to define columns that you want to include in your search results.

Example
$results_columns = Constants::getResultColumns();
$result_column_array = [
        $results_columns['NB_RESULTS'],
        $results_columns['COUNTRY_NAME'],
        $results_columns['ID'],
    ];
Note

If you are not setting result columns, it will set following columns in result_column array by default.

Making a SearchFilesRequest and Calling search files api

These are the complete examples showing how a search request is created and then search api is called, which in turn returns search results in the form of serchFileRequest.

    $results_columns = Constants::getResultColumns();
    $search_params = new SearchParameters();
    $search_params->setWords('tree')->setLimit(3)->setOffset(0);

    $result_column_array = [
        $results_columns['NB_RESULTS'],
        $results_columns['COUNTRY_NAME'],
        $results_columns['ID'],
    ];

    $request = new SearchFilesRequest();
    $request->setLocale('En_US');
    $request->setSearchParams($search_params);
    $request->setResultColumns($result_column_array);

    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $search_files_response = $this->_adobe_stock_client->searchFilesInitialize($request, '')->getNextResponse();
    $results_columns = Constants::getResultColumns();
    $search_params = new SearchParameters();
    $search_params->setWords('tree')->setLimit(3)->setOffset(0);

    $result_column_array = [
        $results_columns['NB_RESULTS'],
        $results_columns['COUNTRY_NAME'],
        $results_columns['ID'],
    ];

    $request = new SearchFilesRequest();
    $request->setLocale('En_US');
    $request->setSearchParams($search_params);
    $request->setResultColumns($result_column_array);

    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $search_files_response = $this->_adobe_stock_client->searchFilesInitialize($request, '')->getPreviousResponse();
    $results_columns = Constants::getResultColumns();
    $search_params = new SearchParameters();
    $search_params->setWords('tree')->setLimit(3)->setOffset(0);

    $result_column_array = [
        $results_columns['NB_RESULTS'],
        $results_columns['COUNTRY_NAME'],
        $results_columns['ID'],
    ];

    $request = new SearchFilesRequest();
    $request->setLocale('En_US');
    $request->setSearchParams($search_params);
    $request->setResultColumns($result_column_array);

    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $search_files_response = $this->_adobe_stock_client->searchFilesInitialize($request, '')->getResponsePage(10);
Accessing SearchCategory
SearchCategory

AdobeStock class allows you to access the Search/Category and Search/CategoryTree Stock APIs. Each stock asset is placed into a category that classifies the asset, such as “Travel” or “Hobbies and Leisure” and each category has a unique identifying number, a name, and a path that you can use to access other assets in the same category.

You can construct the SearchCategoryRequest object to set category identifier and locale information. Then you can call searchCategory method to get information about a category of stock assets in the form of SearchCategoryResponse object. You can also call searchCategoryTree method to retrieve information for zero or more category identifiers in the form of list of SearchCategoryResponse object.

Instantiation

You can construct the object of this class with below arguments -

Example

Sample code to instantiate the SearchCategory API -

    //Instantiating and Initializing AdobeStock
    $client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', new Http());
    //Users ims token
    $access_token = 'ims_token';

    //Constructing SearchCategoryRequest
    $request = new SearchCategoryRequest();
    $request->setCategoryId(1043)->setLocale('En-US');

    //Now you can call searchCategory to get category information
    $response = $client->searchCategory($request, $access_token);
    //You can also call searchCategoryTree to get information about list of categories
    $response = $client->searchCategoryTree($request, $access_token);
Methods SearchCategoryRequest

In order to make SearchCategory/SearchCategoryTree API call, you need to create a SearchCategoryRequest object to define the search criterion for search category results. You can set category identifier and location language code supported by Stock Search Category/Category Tree API here.

Here is the mapping of Search Category/CategoryTree API query parameters with the setters methods that you can use to set the corresponding parameters in PHP Stock SDK -

|API URL Query Parameter| Setter Methods in SearchCategoryRequest |Description| |—|—|—| |locale|setLocale|Sets location language code. For e.g. “en-US”, “fr-FR” etc.| |category_id|setCategoryId|Sets unique identifier for an existing category for e.g 1043|

SearchCategoryResponse

It represents the search result returned from Stock Search/Category API. The AdobeStock class methods for e.g. searchCategory returns the object of SearchCategoryResponse initialized with the results returned from the Search/Category API. SearchCategoryResponse allows you to -

Accessing License
License

License class allows you to purchase an asset, information about purchasing the asset, information about a user's licensing (entitlement) status, determine whether the user has an existing license for an asset,for notifying the system when a user abandons a licensing operation, request a license for an asset for that user if user have authorization for licensing assets and fetch the URL of the asset if it is already licensed.

Instantiation

You can construct the object of this class with below arguments -

License Request

In order to call License APIs you need to create LicenseRequest object for licensing assets, for getting licensing information about a specific asset for specific user, for notifying the system when a user abandons a licensing operation, for getting the licensing capabilities for a specific user.

|Request Parameter| Setter Methods | Related Constants (If applicable) |Description| |—|—|—|—| |content_id|setContentId| |Asset's unique identifer.You can get this from a Search response's id attribute| |license|setLicenseState|licenseStateParams |Use only with Content/Info, Content/License, and Member/Profile. The Adobe Stock licensing state for the asset.| |locale |setLocale| |Use only with Member/Profile.Optional. Location language code for the API to use when returning localized messages. The API can usually get the user's default locale through the Authorization header. This value overrides that or provides a locale if not available through Authorization.| |state |setPurchaseState|purchaseStateParams|Use only with Member/Abandon.The purchase_options.state from the Member/Profile results.| |license_reference|setLicenseReference| |Array of license references of type LicenseReference. Use only with Content/License API.|

License State

Adobe Stock licensing state for the asset.

Purchase States

User's purchase relationship to an asset.

License Response

After calling various APIs in License class, reponse is returned in the form of LicenseResponse. It contains following fields. All class objects used in response are defined below.

|Request Parameter| Getter Methods | Related Class |Description| |—|—|—|—| |available_entitlement |getEntitlement|LicenseEntitlement|Information about licenses available for the user. See LicenseEntitlement| |purchase_options|getPurchaseOptions|LicensePurchaseOptions|Information about the user's purchasing options for the asset. See LicensePurchaseOptions| |member|getMemberinfo|LicenseMemberInfo|Information about the user. See LicenseMemberInfo| |license_references|getLicenseReferences|LicenseReferenceResponse|List of license references of the user. See LicenseReferenceResponse| |contents|getContents|LicenseContent|Mapping from Asset unique identifier to Asset Licensing information. See LicenseContent|

LicenseEntitlement LicensePurchaseOptions LicenseMemberInfo LicenseReferenceResponse LicenseContent Methods Examples

Examples showing how all methods are called with LicenseRequest and return LicenseResponse.

getContentInfo Example
    $request = new LicenseRequest();
    $request->setLocale('En_US');
    $request->setContentId(84071201);

    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $license_response = $this->_adobe_stock_client->getContentInfo($request, '');
getContentLicense Example
    $request = new LicenseRequest();
    $request->setLocale('En_US');
    $request->setContentId(84071201);

    $array = [[
    'id' => 1,
    'value' => 'test',
    ]];
    $request->setLicenseReference($array);
    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $license_response = $this->_adobe_stock_client->getContentLicense($request, '');
getMemberProfile Example
    $request = new LicenseRequest();
    $request->setLocale('En_US');
    $request->setContentId(84071201);

    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $license_response = $this->_adobe_stock_client->getMemberProfile($request, '');
abandonLicense Example
    $request = new LicenseRequest();
    $request->setLocale('En_US');
    $request->setContentId(84071201);

    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $license_response = $this->_adobe_stock_client->abandonLicense($request, '');
downloadAssetRequest Example
    $request = new LicenseRequest();
    $request->setLicenseState('STANDARD');
    $request->setContentId(84071201);

    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $guzzle_request = $this->_adobe_stock_client->downloadAssetRequest($request, '');
downloadAssetUrl Example
    $request = new LicenseRequest();
    $request->setLicenseState('STANDARD');
    $request->setContentId(84071201);

    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $url = $this->_adobe_stock_client->downloadAssetUrl($request, '');
downloadAssetStream Example
    $request = new LicenseRequest();
    $request->setLicenseState('STANDARD');
    $request->setContentId(84071201);

    $this->_adobe_stock_client = new AdobeStock('AdobeStockClient1', 'Adobe Stock Lib/1.0.0', 'PROD', $http_client);
    $image_stream = $this->_adobe_stock_client->downloadAssetStream($request, '');
Accessing LicenseHistory
LicenseHistory

AdobeStock class will allow you to access the LicenseHistory Api. You can construct the LicenseHistoryRequest object to set offset, limit, set result columns etc. for the LicenseHistory api.

First, You have to call initializeLicenseHistory to initialize license history api which will gives you adobe stock object from where you can call getNextLicenseHistory, getPreviousLicenseHistory etc. to fetch the results. The AdobeStock provides paginated interface which allows you to call its methods (for e.g. getNextLicenseHistory, getPreviousLicenseHistory etc.) multiple times to retrieve the subsequent results in order. It maintains the current state of LicenseHistory request and initially, the state is pointing invalid LicenseHistory files results. As soon as, the getNextLicenseHistory method is called, it makes LicenseHistory api call and returns the results with LicenseHistoryResponse object. The getNextLicenseHistory moves the state to next page and fetch the response for the same. Similarly, the getPreviousLicenseHistory and getLicenseHistoryPage methods can be used to move one page behind and skip to a particular LicenseHistory page index respectively.

Instantiation

You can construct the object of this class with below arguments -

Example

Sample code to initialize the LicenseHistory Api -

    $results_columns = Constants::getResultColumns();
    $params = new SearchParamLicenseHistory();
    $params->setOffset(0)->setLimit(5);

    $result_column_array = [
        $results_columns['THUMBNAIL_110_URL'],
        $results_columns['THUMBNAIL_110_WIDTH'],
        $results_columns['THUMBNAIL_110_HEIGHT'],
    ];

    $request = new LicenseHistoryRequest();
    $request->setLocale('En_US');
    $request->setSearchParams($params);
    $request->setResultColumns($result_column_array);

    $this->_adobe_stock_client = new AdobeStock('LucaTest1', 'Spark Page', 'PROD', $http_client);
    $response = $this->_adobe_stock_client->initializeLicenseHistory($request, '');

More examples can be found at the end of this document.

Methods LicenseHistoryRequest

In order to make LicenseHistory API call, you need to create a LicenseHistoryRequest object to define the criterion for LicenseHistory files results. You can set the various search parameters, locale and required result columns supported by Stock LicenseHistory api here.

Here is the mapping of LicenseHistory api query parameters with the setters methods that you can use to set the corresponding parameters in PHP Stock SDK -

|API URL Query Parameter| Setter Methods in SearchFilesRequest |Description| |—|—|—| |locale|setLocale|Sets location language code. For e.g. “en-US”, “fr-FR” etc.| |search_parameters[*]|setSearchParams|Sets An object of SearchParamLicenseHistory where one can set all supported search_parameters| |result_columns[]| setResultColumns | Allows to set the list of result columns required in the search results. If you are not setting result columns, it will set all default columns in result_column array at api level. For more details, read Result Columns section below.|

SearchParameters

SearchParamLicenseHistory allows to set the various search_parameters (URL query parameters) supported by LicenseHistory api. This is the class where you can actually set the limit, offset, thumbnail_size etc.

Mapping of query parameter search_parameters[*] with SearchParamLicenseHistory class setter methods -

|Search Parameter| Setter Methods | Description| |—|—|—| |search_parameters[limit]|setLimit|Allows to set maximum number of assets to return in the call.| |search_parameters[offset]|setOffset|Allows to set the start position in results. | |search_parameters[thumbnail_size]|setThumbnailSize|Allows to set thumbnail size.Valid values - 110, 160,220,240,500, 1000 |

Result Columns

You can create array of ResultColumn enums to define columns that you want to include in your results.

Example
$results_columns = Constants::getResultColumns();
$result_column_array = [
        $results_columns['THUMBNAIL_110_URL'],
        $results_columns['THUMBNAIL_110_WIDTH'],
        $results_columns['THUMBNAIL_110_HEIGHT'],
    ];
Note

If you are not setting result columns, it will set following columns in result_column array by default.

LicenseHistoryResponse

It represents the LicenseHistory results returned with Stock LicenseHistory API. The LicenseHistory class methods for e.g. getNextLicenseHistory returns the object of LicenseHistoryResponse initialized with the results returned from the LicenseHistory api. LicenseHistoryResponse allows you to -

Making a LicenseHistoryRequest and Calling LicenseHistory api

These are the complete examples showing how a request is created and then LicenseHistory api is called, which in turn returns results in the form of LicenseHistoryRequest.

    $results_columns = Constants::getResultColumns();
    $params = new SearchParamLicenseHistory();
    $params->setOffset(0)->setLimit(5);

    $result_column_array = [
        $results_columns['THUMBNAIL_110_URL'],
        $results_columns['THUMBNAIL_110_WIDTH'],
        $results_columns['THUMBNAIL_110_HEIGHT'],
    ];

    $request = new LicenseHistoryRequest();
    $request->setLocale('En_US');
    $request->setSearchParams($params);
    $request->setResultColumns($result_column_array);

    $this->_adobe_stock_client = new AdobeStock('LucaTest1', 'Spark Page', 'PROD', $http_client);
    $response = $this->_adobe_stock_client->initializeLicenseHistory($request, '')->getNextLicenseHistory();
    $results_columns = Constants::getResultColumns();
    $params = new SearchParamLicenseHistory();
    $params->setOffset(0)->setLimit(5);

    $result_column_array = [
        $results_columns['THUMBNAIL_110_URL'],
        $results_columns['THUMBNAIL_110_WIDTH'],
        $results_columns['THUMBNAIL_110_HEIGHT'],
    ];

    $request = new LicenseHistoryRequest();
    $request->setLocale('En_US');
    $request->setSearchParams($params);
    $request->setResultColumns($result_column_array);

    $this->_adobe_stock_client = new AdobeStock('LucaTest1', 'Spark Page', 'PROD', $http_client);
    $response = $this->_adobe_stock_client->initializeLicenseHistory($request, '')->getPreviousLicenseHistory();
    $results_columns = Constants::getResultColumns();
    $params = new SearchParamLicenseHistory();
    $params->setOffset(0)->setLimit(5);

    $result_column_array = [
        $results_columns['THUMBNAIL_110_URL'],
        $results_columns['THUMBNAIL_110_WIDTH'],
        $results_columns['THUMBNAIL_110_HEIGHT'],
    ];

    $request = new LicenseHistoryRequest();
    $request->setLocale('En_US');
    $request->setSearchParams($params);
    $request->setResultColumns($result_column_array);

    $this->_adobe_stock_client = new AdobeStock('LucaTest1', 'Spark Page', 'PROD', $http_client);
    $response = $this->_adobe_stock_client->initializeLicenseHistory($request, '')->getLicenseHistoryPage();

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.