2017 © Pedro Peláez
 

library reflect-php

Reflect API client library for PHP

image

reflect-io/reflect-php

Reflect API client library for PHP

  • Thursday, May 3, 2018
  • by impl
  • Repository
  • 6 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

reflect-php

Installation

$ composer require reflect-io/reflect-php

Generating user tokens

use Reflect\Project\Token;

$accessKey = 'd232c1e5-6083-4aa7-9042-0547052cc5dd';
$secretKey = '74678a9b-685c-4c14-ac45-7312fe29de06';

$parameter = new Token\Parameter(
    'user-id',
    Token\Parameter\Op::EQUALS,
    '1234'
);

$token = (new Token\Builder($accessKey))
    ->setAttribute('user-id', 1234)
    ->setAttribute('user-name', 'Billy Bob')
    ->addParameter($parameter)
    ->build($secretKey);

The Versions