-
Notifications
You must be signed in to change notification settings - Fork 3
Authorized API
If you need to do more complex operations than the Unauthorized API supports, you need to use this API.
Returns an AuthorizedMyna given your String email and password.
Example
myna = Myna.authorize('test@example.com', 'themostsecretpassword')An AuthorizedMyna represents an authorized connection to the Myna API server.
Given a String name, create an experiment with that name. Returns a future of an AuthorizedExperiment (see below).
Example
experiment = myna.create('My new experiment').getGiven a String UUID returns an AuthorizedExperiment representing that experiment.
Example
experiment = myna.experiment('45923780-80ed-47c6-aa46-15e2ae7a0e8c')An AuthorizedExperiment supports the suggest and reward methods on Experiment in the Unauthorized API, and has additional methods to support operations that require authorization.
Returns the UUID, a String, of this AuthorizedExperiment
experiment = myna.experiment('45923780-80ed-47c6-aa46-15e2ae7a0e8c')
puts "UUID is #{experiment.uuid}" # The UUID is 45923780-80ed-47c6-aa46-15e2ae7a0e8cGet information about this experiment, represented by an Experiment Response. Returns a future of said Experiment response.
experiment = myna.experiment('45923780-80ed-47c6-aa46-15e2ae7a0e8c')
info = experiment.info.getGiven a String name for a variant, creates that variant on this experiment. Returns a future of the Ok Response.
experiment = myna.experiment('45923780-80ed-47c6-aa46-15e2ae7a0e8c')
ok = experiment.create_variant('A new variant').getGiven a String name for a variant, deletes that variant on this experiment. Returns a future of the Ok Response.
experiment = myna.experiment('45923780-80ed-47c6-aa46-15e2ae7a0e8c')
ok = experiment.delete_variant('A new variant').get # Bye byeResets the counters of all the variants in this experiment. Returns a future of the Ok Response.
experiment = myna.experiment('45923780-80ed-47c6-aa46-15e2ae7a0e8c')
ok = experiment.reset.get # Forgot all views and conversionsDeletes this experiment. Returns a future of the Ok Response.
experiment = myna.experiment('45923780-80ed-47c6-aa46-15e2ae7a0e8c')
ok = experiment.delete.get # Bye bye experiment