ventureleap/leap-one-user-sdk

dev-master 2021-09-15 13:31 UTC

This package is auto-updated.

Last update: 2024-05-07 12:35:15 UTC


README

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

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

  • API version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.php.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/ventureleap/leap-one-user-sdk.git"
    }
  ],
  "require": {
    "ventureleap/leap-one-user-sdk": "*@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

Getting Started

Please follow the installation procedure and then run the following:

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

// Configure API key authorization: apiKey
$config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VentureLeap\UserService\Api\AccountApi(
    // 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 = "id_example"; // string | 
$username = "username_example"; // string | 
$email = "email_example"; // string | 
$first_name = "first_name_example"; // string | 
$last_name = "last_name_example"; // string | 
$custom_data = "custom_data_example"; // string | 
$user_type = "user_type_example"; // string | 
$active = true; // bool | 
$deleted = true; // bool | 
$page = 1; // int | The collection page number
$items_per_page = 10; // int | The number of items per page
$pagination = true; // bool | Enable or disable pagination

try {
    $result = $apiInstance->apiAccountsUsersGetSubresource($id, $username, $email, $first_name, $last_name, $custom_data, $user_type, $active, $deleted, $page, $items_per_page, $pagination);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->apiAccountsUsersGetSubresource: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: apiKey
$config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VentureLeap\UserService\Api\AccountApi(
    // 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
);
$account_number = "account_number_example"; // string | 
$active = true; // bool | 
$deleted = true; // bool | 
$page = 1; // int | The collection page number
$items_per_page = 10; // int | The number of items per page
$pagination = true; // bool | Enable or disable pagination

try {
    $result = $apiInstance->getAccountCollection($account_number, $active, $deleted, $page, $items_per_page, $pagination);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAccountCollection: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: apiKey
$config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VentureLeap\UserService\Api\AccountApi(
    // 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 = "id_example"; // string | 

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

// Configure API key authorization: apiKey
$config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VentureLeap\UserService\Api\AccountApi(
    // 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 \VentureLeap\UserService\Model\AccountJsonldAccountWrite(); // \VentureLeap\UserService\Model\AccountJsonldAccountWrite | The new Account resource

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

// Configure API key authorization: apiKey
$config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VentureLeap\UserService\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VentureLeap\UserService\Api\AccountApi(
    // 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 = "id_example"; // string | 
$body = new \VentureLeap\UserService\Model\AccountJsonldAccountWrite(); // \VentureLeap\UserService\Model\AccountJsonldAccountWrite | The updated Account resource

try {
    $result = $apiInstance->putAccountItem($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->putAccountItem: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
AccountApi apiAccountsUsersGetSubresource GET /user/accounts/{id}/users Retrieves the collection of User resources.
AccountApi getAccountCollection GET /user/accounts Retrieves the collection of Account resources.
AccountApi getAccountItem GET /user/accounts/{id} Retrieves a Account resource.
AccountApi postAccountCollection POST /user/accounts Creates a Account resource.
AccountApi putAccountItem PUT /user/accounts/{id} Replaces the Account resource.
AddressApi getAddressCollection GET /user/addresses Retrieves the collection of Address resources.
AddressApi getAddressItem GET /user/addresses/{id} Retrieves a Address resource.
AddressApi postAddressCollection POST /user/addresses Creates a Address resource.
AddressApi putAddressItem PUT /user/addresses/{id} Replaces the Address resource.
ConfigurationEntryApi deleteConfigurationEntryItem DELETE /user/configuration_entries/{id} Removes the ConfigurationEntry resource.
ConfigurationEntryApi getConfigurationEntryCollection GET /user/configuration_entries Retrieves the collection of ConfigurationEntry resources.
ConfigurationEntryApi getConfigurationEntryItem GET /user/configuration_entries/{id} Retrieves a ConfigurationEntry resource.
ConfigurationEntryApi postConfigurationEntryCollection POST /user/configuration_entries Creates a ConfigurationEntry resource.
ConfigurationEntryApi putConfigurationEntryItem PUT /user/configuration_entries/{id} Replaces the ConfigurationEntry resource.
SocialAuthenticationApi socialLoginGetAuthUrl GET /user/social/{platform}/auth-url Get Social Platform Authorization Url
SocialAuthenticationApi socialLoginGetUser GET /user/social/{platform} Perform Social Login/Registration for user
UserApi apiAccountsUsersGetSubresource GET /user/accounts/{id}/users Retrieves the collection of User resources.
UserApi getToken POST /user/get-token Gets JWT token for a user
UserApi getUserByTypeItem GET /user/users/{userType}/{username} Retrieves a User resource.
UserApi getUserCollection GET /user/users Retrieves the collection of User resources.
UserApi getUserItem GET /user/users/{id} Retrieves a User resource.
UserApi loginByTokenUserItem POST /user/users/login-by-token/{token} Get User resource from token
UserApi postCredentialsItem POST /user/users/login Check User Credentials
UserApi postPasswordRequest POST /user/users/request-password Checks User Email is correct and sends Password reset link
UserApi postUserCollection POST /user/users Creates a User resource.
UserApi putUserItem PUT /user/users/{id} Replaces the User resource.
UserApi requestMfaCodeUserItem POST /user/users/{id}/request-mfa-code Creates a User resource.
UserApi resetUserPasswordUserItem PATCH /user/users/{id}/reset-password Updates the User resource.
UserApi sendInvitationEmailUserItem POST /user/users/{id}/invitation-email Send Invitation email to User
UserApi validateMfaCodeUserItem POST /user/users/{id}/check-mfa-code Creates a User resource.

Documentation For Models

Documentation For Authorization

apiKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author