The DSL provides a function for most ReviewBoard JSObject members
that directly returns the value of the member. The function name is equivalent
to the name of the member element, for example values of a response:
{ "stat": "fail",
"err": {
"msg": "You are not logged in",
"code": 103
}
}
may be accessed as following:
(msg . err) response
-- returns 'You are not logged in' :: String
(code . err) response
-- returns 103 :: Integer
If the entry name represented by the function does not exist,
an error is thrown.
The current function list is build by screen scraping ReviewBoard
source code, so it's likely that some elements are missing.
The missing function can be added using mkrb function.
Please drop me an email if you find one and I will include
this in the next version.
This approach for handling responses may change if I find a way
to generate the DSL methods directly from ReviewBoard code.
|