2017 © Pedro Peláez
 

library hubid-api-client

Library for working with Hub Culture API

image

hub/hubid-api-client

Library for working with Hub Culture API

  • Wednesday, July 18, 2018
  • by hubculture
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Hub Culture API hubculture logo

Wiki https://github.com/hub/APIHubID/wiki, (*1)

Swagger api.hubculture.com, (*2)

Usage

Include the library with composer., (*3)

composer require hub/hubid-api-client

Authentication

Refer to the https://hubculture.com/developer/home for obtaining the private and public keys., (*4)

include '/vendor/autoload.php';

use Hub\HubAPI\HubClient;

$redirectUrl = 'http://localhost/callback.php';
$config = array(
    // @see https://hubculture.com/developer/home
    'private_key' => '<your private key>',
    'public_key' => '<your public key>',
    'client_id' => 12345,
);

$hubClient = new HubClient($config);

$redirectLoginHelper = $hubClient->getRedirectLoginHelper();
$redirectLoginHelper->getAccessToken($redirectUrl);

User Service

Retrieving a user by id, (*5)

include '/vendor/autoload.php';

use Hub\HubAPI\Service\UserService;

$config = array(
    'private_key' => '<your private key>',
    'public_key' => '<your public key>',
    'token' => '<access_token you got from the auth endpoint>',
);

$service = new UserService($config);
$user = $service->getUserById(18495);
var_dump($user);

Examples

Please run the following command to run a PHP server serving examples., (*6)

HUBID_PRIVATE_KEY=[your-private-key] HUBID_PUBLIC_KEY=[your-public-key] make demo

Browse to http://localhost:8085/friend-service.php., (*7)

You may look at examples under examples directory., (*8)

The Versions

18/07 2018

dev-master

9999999-dev

Library for working with Hub Culture API

  Sources   Download

The Requires

 

by serhiyosetskiy

17/07 2018

1.2

1.2.0.0

API

  Sources   Download

The Requires

 

by serhiyosetskiy

17/07 2018

1.0

1.0.0.0

API

  Sources   Download

The Requires

 

by serhiyosetskiy

17/07 2018

1.1

1.1.0.0

API

  Sources   Download

The Requires

 

by serhiyosetskiy