|
ReviewBoard.Api | Portability | portable | Stability | experimental | Maintainer | adam.smyczek@gmail.com |
|
|
|
|
|
Description |
ReviewBoard API
This package provides the basic ReviewBoard API calls.
All calls are executed inside the RBAction monad that represents
a session to the ReviewBoard server. A login to the server is performed
in the RBAction run method runRBAction.
All actions return the RBResponse object containing the response
status RBStatus and the original JSon response. Errors are handled in
two ways:
- Network errors, for example connection errors throw an exception.
- Response errors resulting in for example invalid request parameters are
handled using the rbErrHandler (by default print to stdin).
The current version provides mainly API calls to handle review requests,
but this can be easily extended using generalized rbPostRequest, rbGetRequest
or directly the main runRequest functions.
Refer to project page for details:
http://code.google.com/p/reviewboard/wiki/ReviewBoardAPI
TODOs:
- Add more API calls, of cause!
- Add abstraction for response data, for example reviewRequestNew should
return the id of the new created request. Currently this have to be
parsed from the JSon response e.g. using rrId function.
|
|
Synopsis |
|
|
|
Documentation |
|
module ReviewBoard.Core |
|
module ReviewBoard.Browser |
|
|
Get review request with id.
|
|
|
Create new review request using the provided repository path and an optional
submit_as user. The returned response contains the id of the new created
review request that can be accessed using rrId helper function.
|
|
|
Delete review request with request id.
|
|
|
Set fields to review request draft with id.
|
|
|
Set one field for review request draft with id.
|
|
|
Save review request draft whith id.
|
|
|
Add a new diff to a review request with id, file path and the basedir parameter.
|
|
|
List review requests addressed to one user with a status. If user and status are Nothing,
reviewRequestList lists all request.
|
|
|
Review request field type.
| Constructors | STATUS | | PUBLIC | | SUMMARY | | DESCRIPTION | | TESTING_DONE | | BUGS_CLOSED | | BRANCH | | TARGET_GROUPS | | TARGET_PEOPLE | |
| Instances | |
|
|
|
Execute a ReviewBoard action using the provided URL, user
and password.
|
|
|
Default POST request builder for text field parameters only.
|
|
|
Default GET request builder for text field parameters only.
|
|
|
Get the id from a review request response.
|
|
Example
|
|
The following RBAction creates a new review request draft, sets few fields
and uploads a diff file:
newRRAction :: RBAction ()
newRRAction = do
rsp <- reviewRequestNew "repository" Nothing
let id = fromJust . rrId $ rsp
reviewRequestsSetField id TARGET_PEOPLE "reviewers"
reviewRequestsSetField id DESCRIPTION "Request description"
reviewRequestsDiffNew id "basedir" "diffFileName"
reviewRequestSaveDraft id
liftIO $ print "Done."
To run this action, execute:
execRBAction "url" "user" "password" newRRAction
|
|
Produced by Haddock version 2.3.0 |