2017 © Pedro Peláez
 

library toggle-api

Api interface for your toggles.

image

qandidate/toggle-api

Api interface for your toggles.

  • Friday, May 25, 2018
  • by asm89
  • Repository
  • 9 Watchers
  • 29 Stars
  • 66 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

Toggle API

An API for managing your toggles, uses Redis to store the toggle collection., (*1)

build status, (*2)

About

Read our blog post series about this repository at: - http://labs.qandidate.com/blog/2014/08/18/a-new-feature-toggling-library-for-php/ - http://labs.qandidate.com/blog/2014/08/19/open-sourcing-our-feature-toggle-api-and-ui/, (*3)

Installation

Install the dependencies with composer:, (*4)

make dependencies

Configuration is determined based on environment variables. See the .env.* files. You can override the values in the file with environment values. The default configuration is mainly for local development., (*5)

The environment variable TOGGLE__ALLOWED_ORIGINS should be valid JSON. This is to allow arrays., (*6)

Running the tests

We use PHPUnit, so to run the tests simply run:, (*7)

docker-compose up -d
make test

Running the app

With your favorite webserver (or with php -S 127.0.0.1:1337 -t public for local testing) point your document root to the public folder., (*8)

Endpoints

Retrieve the toggles

GET /toggles, (*9)

Create or update a toggle

PUT /toggles/{name}, (*10)

Example request:, (*11)

{
   "conditions" : [
      {
         "name" : "operator-condition",
         "operator" : {
            "name" : "less-than",
            "value" : "1337"
         },
         "key" : "user_id"
      }
   ],
   "name" : "foo",
   "status" : "conditionally-active",
   "originalName" : "foo"
}

NOTE: PUT doesn't remove the previous toggle if you rename it. So if you want to rename foo to bar, you would have to PUT bar and DELETE foo., (*12)

Delete a toggle

DELETE /toggles/{name}, (*13)

License

MIT, see LICENSE., (*14)

The Versions

25/05 2018

dev-master

9999999-dev

Api interface for your toggles.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar othillo
by Willem-Jan

api switch feature trigger toggle bits flip flipping

03/07 2015

0.3.0

0.3.0.0

Api interface for your toggles.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar othillo
by Willem-Jan

api switch feature trigger toggle bits flip flipping

13/10 2014

0.2.0

0.2.0.0

Api interface for your toggles.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar othillo
by Willem-Jan

api switch feature trigger toggle bits flip flipping

19/08 2014

0.1.0

0.1.0.0

Api interface for your toggles.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar othillo
by Willem-Jan

api switch feature trigger toggle bits flip flipping