The unofficial (basic) Ruby gem to communicate with the Optimizely Experiment API (http://developers.optimizely.com/rest/). The Experiment API lets you create and manage Optimizely projects and experiments.
To start using the Optimizely Experiment API you need an API Token, you can request one via: developers@optimizely.com
Add Optimizely to your Gemfile
gem 'optimizely'
Don't forget to bundle install:
$ bundle install
optimizely = Optimizely.new({ api_token: 'abcdefghijklmnopqrstuvwxyz:123456' })
The fields that are available for a project: project_name, project_status, id and account_id.
Retrieve all projects:
projects = optimizely.projects
Retrieve a specific project:
project = optimizely.project(12345)
Delete a project, you need to retrieve the project first:
project = optimizely.project(12345)
optimizely.delete
The fields that are available for an experiment: id, project_id, variation_ids, edit_url and status.
Retrieve all experiments for a project:
experiments = optimizely.experiments(12345)
Retrieve a specific experiment:
experiment = optimizely.experiment(12345)
Delete an experiment, you need to retrieve the experiment first:
experiment = optimizely.experiment(12345)
optimizely.delete
The fields that are available for a varation: is_paused, description, weight, created, variation_id, section_id, js_component, experiment_id, project_id and id.
Retrieve all variations for an experiment:
variations = optimizely.variations(12345)
Retrieve a specific variation:
variation = optimizely.variation(12345)
Delete a variation, you need to retrieve the variation first:
variation = optimizely.variation(12345)
optimizely.delete
The fields that are available for an audience: id, name, project_id and description.
Retrieve all audiences for an project:
audiences = optimizely.audiences(12345)
Retrieve a specific audience:
audience = optimizely.audience(12345)
Delete an audience, you need to retrieve the audience first:
audience = optimizely.audience(12345)
optimizely.delete
If you discover any bugs, feel free to create an issue on GitHub. Please add as much information as possible to help us fixing the possible bug. We also encourage you to help even more by forking and sending us a pull request.
https://github.com/martijnsch/optimizely-gem/issues
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)