Class: Pagerdupi::Incident
- Inherits:
-
Object
- Object
- Pagerdupi::Incident
- Defined in:
- lib/pagerdupi/incidents.rb
Instance Method Summary collapse
- #create(params = {}) ⇒ Object
- #delete(params = {}) ⇒ Object
-
#initialize(api_key) ⇒ Incident
constructor
A new instance of Incident.
- #list(params = {}) ⇒ Object
- #show(params = {}) ⇒ Object
- #update(params = {}) ⇒ Object
Constructor Details
Instance Method Details
#create(params = {}) ⇒ Object
23 24 |
# File 'lib/pagerdupi/incidents.rb', line 23 def create(params = {}) end |
#delete(params = {}) ⇒ Object
29 30 |
# File 'lib/pagerdupi/incidents.rb', line 29 def delete(params = {}) end |
#list(params = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pagerdupi/incidents.rb', line 8 def list(params = {}) default_params = { limit: 25, since: (Time.now - 7 * 24 * 60 * 60).strftime('%Y-%m-%d'), until: Time.now.strftime('%Y-%m-%d'), time_zone: 'Asia/Tokyo', } query_params = default_params.merge(params) Hashie::Mash.new(@pagerdupi.get('/incidents', query: query_params)) end |
#show(params = {}) ⇒ Object
20 21 |
# File 'lib/pagerdupi/incidents.rb', line 20 def show(params = {}) end |
#update(params = {}) ⇒ Object
26 27 |
# File 'lib/pagerdupi/incidents.rb', line 26 def update(params = {}) end |