-
Notifications
You must be signed in to change notification settings - Fork 3
Responses
We represent the responses you can get from Myna as subclasses of a Response class. You need to know what attributes are available on the subclasses to use the Myna client, so here they are:
When you ask Myna for a suggestion, this is what you get. Available attributes are:
-
choice. AStringthat is the name of the variant Myna suggests. -
token. AStringthat you must send back to Myna to reward this suggestion.
A singleton, used to indicate successful completion of actions that have no useful result. Has no attributes.
Has a single attribute uuid, a String representing a globally unique identifier.
Contains information about an experiment. Has attributes
-
name. AStringthat is the name of the experiment. -
uuid. AStringthat is the UUID of the experiment. -
accountId. AStringthat is the UUID of the account that owns this experiment. -
variants. AnArrayofVariants, described below.
Represent a variant within an experiment. Attributes are:
-
name. AString. -
views. AInteger, the number of times this variant has been suggested (and hence viewed) -
totalReward. AFloat, the total reward this variant has received. -
lowerConfidenceBound. AFloat, a 95% confidence lower-bound on the average reward of this variant. -
upperConfidenceBound. AFloat, a 95% confidence upper-bound on the average reward of this variant.
This subclass of Response is the superclass of all the error respones below.
Represents an error that Myna sent back. Has attributes:
-
subtype. AnIntegercorresponding to the HTTP response code associated with this error. Usually in the 500-599 range. -
messages. AnArrayofArrays. The sub-arrays have keystypenameanditem, both returnStrings, that give more information about the error.
Represents a error that occurred on the network. Has no attributes as I don't know how to get useful information out of EventMachine in this case.