Class: Hatolence::Offense
Class Method Summary
collapse
Instance Method Summary
collapse
#params
Methods included from HttpClient
#build_request, #get_resource, #resource, #root_url
Class Method Details
.all ⇒ Object
6
7
8
|
# File 'lib/hatolence/offense.rb', line 6
def self.all
self.new.all
end
|
.filter_by(*category) ⇒ Object
10
11
12
|
# File 'lib/hatolence/offense.rb', line 10
def self.filter_by *category
self.new.filter_by(category)
end
|
Instance Method Details
#all ⇒ Object
14
15
16
17
|
# File 'lib/hatolence/offense.rb', line 14
def all
result = get_resource
JSON.parse(result)
end
|
#filter_by(category) ⇒ Object
19
20
21
22
|
# File 'lib/hatolence/offense.rb', line 19
def filter_by category
result = get_resource(params("category",category))
JSON.parse(result)
end
|