Class: PewPew::Resources::Complaints
- Inherits:
-
Object
- Object
- PewPew::Resources::Complaints
- Includes:
- PewPew::Resource
- Defined in:
- lib/pew_pew/resources/complaints.rb
Instance Method Summary collapse
-
#all ⇒ Mash
Fetches all spam complaints.
-
#create(params) ⇒ Mash
Creates a new spam complaint.
-
#find(address) ⇒ Mash
Fetch all spam complaints by address.
-
#remove(address_or_id) ⇒ Mash
Removes existing spam complaints.
Instance Method Details
#all ⇒ Mash
Fetches all spam complaints.
10 11 12 |
# File 'lib/pew_pew/resources/complaints.rb', line 10 def all get("#{domain}/complaints") end |
#create(params) ⇒ Mash
Creates a new spam complaint.
26 27 28 |
# File 'lib/pew_pew/resources/complaints.rb', line 26 def create(params) post("#{domain}/complaints", params) end |
#find(address) ⇒ Mash
Fetch all spam complaints by address.
18 19 20 |
# File 'lib/pew_pew/resources/complaints.rb', line 18 def find(address) get("#{domain}/complaints/#{address}") end |
#remove(address_or_id) ⇒ Mash
Removes existing spam complaints.
35 36 37 |
# File 'lib/pew_pew/resources/complaints.rb', line 35 def remove(address_or_id) delete("#{domain}/complaints/#{address_or_id}") end |