aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-06-08 04:47:38 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-06-08 04:47:38 +0000
commit811d8302e1b6280d3bd29f545a79f857c1c48ca0 (patch)
treec51c4097ee90f7dbb9661af9f4ad17bc7e77b0a8
parentWire up buglisturl for use in announcements. (diff)
downloadrbot-bugzilla-811d8302e1b6280d3bd29f545a79f857c1c48ca0.tar.gz
rbot-bugzilla-811d8302e1b6280d3bd29f545a79f857c1c48ca0.tar.bz2
rbot-bugzilla-811d8302e1b6280d3bd29f545a79f857c1c48ca0.zip
Add basic search utility.
-rw-r--r--bugzilla.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/bugzilla.rb b/bugzilla.rb
index 73e77b0..76380f9 100644
--- a/bugzilla.rb
+++ b/bugzilla.rb
@@ -416,6 +416,12 @@ class BugzillaPlugin < Plugin
self.lastseenid = buglist[-1][0].to_i if buglist.size > 0
end
+ def search(urlparams, params = nil)
+ url = buglisturl + urlparams
+ searchdata = CSV::Reader.create(@bot.httputil.get(url)).to_a
+ return searchdata
+ end
+
def report(urlparams, params = nil)
url = "#{reporturl}&#{urlparams}"
reportdata = CSV::Reader.create(@bot.httputil.get(url)).to_a