lib/nzbmatrix/client.rb in nzbmatrix-0.0.3 vs lib/nzbmatrix/client.rb in nzbmatrix-0.0.4

- old
+ new

@@ -18,10 +18,16 @@ def download(nzb_id) RestClient.get "#{BASE_URL}/download.php", :params => { :id => nzb_id }.merge(@creds) end def details(nzb_id) - RestClient.get "#{BASE_URL}/details.php", :params => { :id => nzb_id }.merge(@creds) + params = { :id => nzb_id }.merge(@creds) + response = RestClient.get("#{BASE_URL}/details.php", :params => params) + parsed_response = @parser.parse(response).first + result = SearchResult.new(parsed_response, self) + result.id = nzb_id + + result end # Options # :catid => CATEGORYID all categories searched if left blank # :num => MAX RESULTS default 15