2

Is there any way to use the FogBugz API in a GreaseMonkey (or BugMonkey) script?

I can see how it would be useful to query the API as the same user context as the currently logged in user to retrieve extra information.

For example, when you ask a question on this Stack Exchange site you get an instant search of related questions in order to discourage duplicates.

Imagine if a user was entering what they thought was a new defect, and a BugMonkey/GreaseMonkey script reacted to entering the bug title, performed a search against the FogBugz API, and displayed the results below the bug title in the same way.

This could lead someone who thought they were entering a new defect to instead find an old case containing the solution.

flag

1 Answer

2

I don't see any reason why you couldn't accomplish this with an AJAX request us HTTPRequest object or even simpler, use the JQUERY.Load method to pull down the extra information.

link|flag
The problem is that all of the API calls require a token that you would normally receive through an API call to the logon command, passing email address and password. How would you get that token from the client side? – David Feb 15 2010 at 14:01
As per the link below, tokens do not expire without an explicit call to the "logoff" command, so you could just perform the logon step once manually, and then hard-code the token into your BugMonkey/GreaseMonkey script as suggested by JohnFx. fogbugz.stackexchange.com/questions/902/… – db Feb 15 2010 at 18:58

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.