ForstaLabs / atlas-client-php

An http client for Atlas in PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwaggerClient-php

User and Tag management API for Forsta Messaging Platform

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

  • API version: v1
  • Build package: io.swagger.codegen.languages.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/ForstaLabs/atlas-client-php.git"
    }
  ],
  "require": {
    "ForstaLabs/atlas-client-php": "*@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: JSON Web Token
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\ApiTokenRefreshApi(
    // 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
);
$data = new \Swagger\Client\Model\Refresh(); // \Swagger\Client\Model\Refresh | 

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

?>

Documentation for API Endpoints

All URIs are relative to https://atlas.forsta.io/v1

Class Method HTTP request Description
ApiTokenRefreshApi apiTokenRefreshCreate POST /api-token-refresh/ Returns a refreshed token (with new expiration) based on existing token
ConversationApi conversationCreate POST /conversation/ Creates a conversation token.
ConversationApi conversationEdit POST /conversation/{conversation_token}/ Facilitates placing a user into a Conversation specified by its token.
ConversationApi conversationRead GET /conversation/{conversation_token}/ Returns information about a conversation (if the requestor is the creator).
DirectoryApi directoryDomainList GET /directory/domain/ Global domain directory.
DirectoryApi directoryUserList GET /directory/user/ Global user directory.
EphemeralTokenApi ephemeralTokenCreate POST /ephemeral-token Retrieves the ephemeral user token
EphemeralTokenApi ephemeralTokenDelete DELETE /ephemeral-token Delete the ephemeral user token
EphemeralUserApi ephemeralUserCreate POST /ephemeral-user/ Create an ephemeral user
LoginApi loginCreate POST /login/ Returns a JWT based on password, otp, or authtoken login mechanisms
LoginApi loginSendRead GET /login/send/{org}/{tag_slug}/ Returns the current authentication method for the specified user
OrgApi orgCreate POST /org/
OrgApi orgDelete DELETE /org/{id}/
OrgApi orgList GET /org/
OrgApi orgPartialUpdate PATCH /org/{id}/
OrgApi orgRead GET /org/{id}/
OrgApi orgUpdate PUT /org/{id}/
PasswordApi passwordResetCreate POST /password/reset/ Sends email or SMS to a user with a one time token for password resetting.
PasswordApi passwordResetUpdate PUT /password/reset/{user_id}/ Confirm the password reset via token.
RecoverApi recoverEmailRead GET /recover/email/{email}/ Sends a list of existing accounts to a users email
RecoverApi recoverPhoneRead GET /recover/phone/{phone}/ Sends a list of existing user accounts based on phone number
TagApi tagCreate POST /tag/
TagApi tagDelete DELETE /tag/{id}/
TagApi tagList GET /tag/
TagApi tagPartialUpdate PATCH /tag/{id}/
TagApi tagRead GET /tag/{id}/
TagApi tagUpdate PUT /tag/{id}/
TagPickApi tagPickList GET /tag-pick/
TagmathApi tagmathCreate POST /tagmath/ Request information based on tag expressions
UserApi userCreate POST /user/
UserApi userDelete DELETE /user/{id}/
UserApi userInvite POST /user/{id}/invite/
UserApi userList GET /user/
UserApi userPartialUpdate PATCH /user/{id}/
UserApi userRead GET /user/{id}/
UserApi userUpdate PUT /user/{id}/
UserauthtokenApi userauthtokenCreate POST /userauthtoken/ Create an auth token
UserauthtokenApi userauthtokenDelete DELETE /userauthtoken/{id}/ Delete a token based on token id
UserauthtokenApi userauthtokenList GET /userauthtoken/ Retrieve the list of auth tokens for a specified user
UsertagApi usertagCreate POST /usertag/
UsertagApi usertagDelete DELETE /usertag/{id}/
UsertagApi usertagList GET /usertag/
UsertagApi usertagRead GET /usertag/{id}/

Documentation For Models

Documentation For Authorization

JSON Web Token

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

Author

support@forsta.io

About

An http client for Atlas in PHP


Languages

Language:PHP 99.9%Language:Shell 0.1%