Git Product home page Git Product logo

optimizely-gem's Introduction

Optimizely

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: [email protected]

Quick start

Installation

Add Optimizely to your Gemfile

gem 'optimizely'

Don't forget to bundle install:

$ bundle install

General usage

Create your Optimizely object

optimizely = Optimizely.new({ api_token: 'abcdefghijklmnopqrstuvwxyz:123456' })

Projects

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

Experiments

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

Variations

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

Audiences

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

Information

Changelog

1.2.0

  • Provide users with a method to delete audiences, experiments, variations and projects.

1.1.3

  • Add methods for put, post and delete requests.
  • Refactor the way we check response codes to make it available to the put, post and delete methods.

1.1.2

  • Write tests to check what happens if data is not available.

1.1.1

  • Return a hash object for the data you've just requested.

1.1

  • Fix some typos in the errors for having no variable in a function and added extra documentation.
  • Add support for reading specific projects, experiments, variations and audiences.

1.0

  • Add all basic features for the Optimizely Experiment API for listing projects, experiments, variations and audiences.

Bug reports

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

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new pull request

optimizely-gem's People

Contributors

martijnsch avatar tei1988 avatar thomasdziedzic-pd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.