minotaurlogistics/ebay-identity-api

1.0 2021-03-22 08:43 UTC

This package is auto-updated.

Last update: 2024-04-22 15:49:26 UTC


README

Build Status

SwaggerClient-php

Retrieves the authenticated user's account profile information. It can be used to let users log into your app or site using eBay, which frees you from needing to store and protect user's PII (Personal Identifiable Information) data.

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: v1.0.0
  • Package version: 1.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/minotaurlogistics/ebay-identity-api.git"
    }
  ],
  "require": {
    "minotaurlogistics/ebay-identity-api": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

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

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Generate Client

docker run --rm -v ${PWD}:/codegen/SwaggerClient-php swaggerapi/swagger-codegen-cli generate \
-i https://developer.ebay.com/api-docs/master/commerce/identity/openapi/2/commerce_identity_v1_oas2.json \ 
-o /codegen \
-l php \
--git-user-id minotaurlogistics --git-repo-id ebay-identity-api \
--invoker-package 'Swagger\EbayIdentityClient' \
--artifact-version 1.0 \
--api-package 'GeneratedApi'

Getting Started

Please follow the installation procedure and then run the following:

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

// Configure OAuth2 access token for authorization: Authorization Code
$config = Swagger\EbayIdentityClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\EbayIdentityClient\Api\UserApi(
    // 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
);

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

?>

Documentation for API Endpoints

All URIs are relative to https://apiz.ebay.com/commerce/identity/v1

Class Method HTTP request Description
UserApi getUser GET /user/

Documentation For Models

Documentation For Authorization

Authorization Code

Author