865
edits
(→API) |
|||
| Line 24: | Line 24: | ||
example: | example: | ||
<pre>bugzillaRPC.getBug(48875, function(bug) {alert(bug.summary);}, function(errMsg) {alert(errMsg)});</pre> | <pre>bugzillaRPC.getBug(48875, | ||
function(bug) {alert(bug.summary);}, | |||
function(errMsg) {alert(errMsg)});</pre> | |||
=== getBugs === | === getBugs === | ||
| Line 59: | Line 61: | ||
function(bugs) {alert(bugs[0].summary); | function(bugs) {alert(bugs[0].summary); | ||
function(errMsg) {alert(errMsg)});</pre> | function(errMsg) {alert(errMsg)});</pre> | ||
=== login === | |||
Authenticates a Bugzilla user for future API calls. | |||
parameters: | |||
* login - the user's login name | |||
* password - the user's password | |||
* callback | |||
* errback | |||
success parameter: | |||
*id - the id of the logged in user | |||
example: | |||
<pre>bugzillaRPC.getBug(test@company.com, mypassword | |||
function(id) {alert('user ' + id + 'logged in'); | |||
function(errMsg) {alert(errMsg)});</pre> | |||
=== logout === | |||
Logs out the currently logged in user. | |||
parameters: | |||
* callback | |||
* errback | |||
success parameter: | |||
- | |||
example: | |||
<pre>bugzillaRPC.getBug( function() {alert('logged out'); | |||
function(errMsg) {alert(errMsg)});</pre> | |||
edits