|
| ReviewBoard.Core | | Portability | portable | | Stability | experimental | | Maintainer | adam.smyczek@gmail.com |
|
|
|
| Description |
| Base types and functions.
|
|
| Synopsis |
|
|
|
| Documentation |
|
|
The action monad, a state with error handler.
RBAction represents one ReviewBoard session that handles multiple API calls.
The RBAction runner runRBAction performs a login into the ReviewBoard server
and initializes the session. All session related parameters are stored in
the RBState of the action.
Errors are handled in two ways:
- Network related error are immediately thrown using ErrorT throwError.
- ReviewRequest response errors are handled using the error handler defined
in RBState (default print).
| Instances | |
|
|
|
| RB action state containing session related information.
| | Constructors | | RBState | | | rbUrl :: String | ReviewBoard server URL
| | rbUser :: String | Logged in user
| | rbSessionId :: Maybe Cookie | Session id cookie retrieve from a successful login
| | rbErrHandler :: String -> IO () | Error handler, for example error or print
|
|
| Instances | |
|
|
|
| Run for RBAction, performs a login using provided URL, user
and password parameters and executes the action. When login fails
runRBAction returns immediately with an error.
|
|
|
| Set error handler used for ReviewBoard error responses.
|
|
|
| Response status type parsed from ReviewBoard Json response stat object,
for example { "stat" : "ok/fail" }
| | Constructors | | RBok | Successful response
| | RBerr String | Response error including error message
|
| Instances | |
|
|
|
| Response type returned by all API calls
| | Constructors | | Instances | |
|
|
|
| The request runner, generates request from provided Form parameter,
executes the requests and handles the response using the handler function.
|
|
|
| Convenient lift for BrowserActions
|
|
|
| Create ReviewBoard specific URI for API call URL.
In case of invalid URL an exception is thrown.
|
|
|
| Enable/disable debug output for Browser module
|
|
|
| Return value for string path e.g.
[] (Int 5) -> Just $ Int 5
[stat] (Obj stat (Str ok)) -> Just $ Str ok
[stat] (Obj nostat (Str ok)) -> Nothing
|
|
|
| Return Integer value for path or Nothing
if path does not exists or is not a JSRational
|
|
|
| String value for path, same as jsInt
|
|
| Produced by Haddock version 2.3.0 |