espadav8/phpflagr

0.1.0 2019-02-15 12:19 UTC

This package is auto-updated.

Last update: 2024-12-16 04:58:33 UTC


README

Flagr is a feature flagging, A/B testing and dynamic configuration microservice

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

  • API version: 1.0.0
  • Package version: 0.1.0
  • 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/espadav8/phpflagr.git"
    }
  ],
  "require": {
    "espadav8/phpflagr": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to//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');

$apiInstance = new EspadaV8\PHPFlagr\Api\ConstraintApi(
    // 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()
);
$flagID = 789; // int | numeric ID of the flag
$segmentID = 789; // int | numeric ID of the segment
$body = new \EspadaV8\PHPFlagr\Model\CreateConstraintRequest(); // \EspadaV8\PHPFlagr\Model\CreateConstraintRequest | create a constraint

try {
    $result = $apiInstance->createConstraint($flagID, $segmentID, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConstraintApi->createConstraint: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to http://localhost/api/v1

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author