-
Notifications
You must be signed in to change notification settings - Fork 11
API Draft
Lim Chee Aun edited this page Nov 12, 2013
·
4 revisions
Kopi
will be a singleton like JSON
.
Kopi.parse('Kopi O');
// return {water: 0.5, coffee: 0.5, condensed_milk: 0, evaporated_milk: 0, sugar: 0, ice: false}
Ingredients
-
water
- number, default1
, 0 to 1 -
coffee
- number, default0
, 0 to 1 -
condensed_milk
(sweetened) - number, default0
, 0 to 1 -
evaporated_milk
(unsweetened), number, default0
, 0 to 1 -
sugar
- number, default0
, 0 to infinite -
ice
- boolean, defaultfalse
Notes
-
water
,coffee
,condensed_milk
,evaporated_milk
will be the ratio and summed up to 1 (100%). -
1
sugar will probably mean the normal amount of sugar, perhaps 2 teaspoons(?). Less sugar would probably mean around0.5
, and0
means no sugar. - Parser needs to handle cases like 'Kopi C' and 'Kopi See'.
Kopi.stringify({water: .5, coffee: .5});
// return 'Kopi O'