2017 © Pedro Peláez
 

library php-sdk

image

oneall/php-sdk

  • Thursday, May 3, 2018
  • by oneall
  • Repository
  • 7 Watchers
  • 6 Stars
  • 62 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 12 Forks
  • 1 Open issues
  • 11 Versions
  • 11 % Grown

The README.md

OneAll PHP SDK

The SDK allows you to communicate with the OneAll API using PHP. It implements all API features through a curl or socket (FSockOpen) client. Implementation examples are available in the oneall/php-api-examples repository., (*1)

Getting Started

Prerequisites

  • A webserver with PHP >=5.4
  • A free OneAll account and a site. You will need the site's subdomain, public key and private key.

Installing

composer require "oneall/php-sdk:~2.0", (*2)

Testing

./vendor/bin/phpunit tests/unit --coverage-html tests/results/unit, (*3)

Using our PHP-SDK

The PHP-SDK is composed of * PHP clients (curl & FSockOpen) & a builder * Apis object to use our differents endpoints. * An ApiContainer containing all Apis object., (*4)

Get you configuration

In order to use the PHP-SDK, you'll need your application credentials you can find on our website., (*5)

$subDomain = 'your-subdomain';
$sitePublicKey = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
$sitePrivateKey = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';

Create the client

First, you'll have to create a php client which contains the previous credentials. You can choose between curl or *fsockopen, depending on your system. damie // create the client through our builder $builder = new Oneall\Client\Builder(); $client = $builder->build('curl', $subDomain, $sitePublicKey, $sitePrivateKey);, (*6)

// Or build it directly
$curlClient = new \Oneall\Client\Adapter\Curl($subDomain, $sitePublicKey, $sitePrivateKey);

Use our API objects

Finally, instantiate the ApiObject you need (checkout our api documentation for more details). Each ApiObject needs the client in order to interact (and automatically log in) with ours services., (*7)

$connectionApi = new \Oneall\Api\Apis\Connection($client);
$connections = $api->getConnectionApi()->getAll();

You may use our ApiContainer to ease their instantiation., (*8)

$api = new \Oneall\OneallApi($client);
$connections = $api->getConnectionApi()->getAll();

For example, if you want to publish a message on Twitter., (*9)

$api = new \Oneall\OneallApi($client);
$twitter_api = $api->getProviderApi()->getProviderApi('twitter');
$twitter_api->publish($identity_token, $message);

Documentation

More inforation on our documentation., (*10)

Here is a step-by-step documetation for implementing our Social Login, Social Link and Single Sign-On services on a website that already has users with accounts., (*11)

License

GNU General Public License, available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html, (*12)

The Versions

03/05 2018

dev-master

9999999-dev

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires

17/04 2018

2.1.0

2.1.0.0

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires

16/04 2018

dev-feature/site/form-login-endpoint

dev-feature/site/form-login-endpoint

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires

20/03 2018

dev-feature/youtube-endpoints

dev-feature/youtube-endpoints

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires

20/03 2018

2.0.0

2.0.0.0

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires

23/02 2018

1.1.3

1.1.3.0

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires

20/02 2018

dev-features/pinterest

dev-features/pinterest

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires

28/11 2017

1.1.2

1.1.2.0

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires

31/10 2017

1.1.1

1.1.1.0

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires

26/10 2017

1.1.0

1.1.0.0

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires

18/10 2017

1.0.0

1.0.0.0

  Sources   Download

The Requires

  • php >=5.4

 

The Development Requires