afosto/io-sdk

Afosto IO SDK

1.13.32 2021-06-22 05:37 UTC

README

The Afosto.io SDK for PHP makes it easy for developers to access and use afosto-io services.

Getting Started

If you run into any problems please do not hesitate to open an issue at this repository.

Docs

API documentation can be found at https://developers.afosto.io.

Prerequisites

To get started you'll need:

  • a free afosto.io account (signup here)
  • make sure you have composer installed to get started quickly
  • php 7

Installing

You can easily install the client through composer:

composer require afosto/io-sdk

Built with

  • JanePHP - For generation the api client
  • Swagger - API management tool
  • Redoc - Great API documentation tool

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Example

Connecting with the SDK is easy. You instantiate the sdk with client credentials, and you are ready to make requests additionaly you can add the scopes you want you your request

$scopes = ['iam:users:create'];
$client = new \Afosto\Sdk\Sdk("1234","123456",$scopes);
$user = $client->getAuthorizedClient()->createUser(
    (new \Afosto\Sdk\Model\IamUserModel)
        ->setEmail("info@afosto.com")
        ->setFirstName("info")
        ->setLastName("afosto")
);

//prints the created user id
print_r($user->getId());

License

This project is licensed under the MIT License - see the LICENSE.md file for details