Skip to content

Commit

Permalink
DA:Client: add interface for POST /set-dismiss-springboard-alerts-aut…
Browse files Browse the repository at this point in the history
…omatically
  • Loading branch information
jmoody committed Feb 28, 2017
1 parent 3bb8725 commit 0aba3bc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/run_loop/device_agent/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,25 @@ def dismiss_springboard_alert(button_title)
true
end

# @!visibility private
def dismiss_springboard_alerts_automatically
parameters = { :dismiss_automatically => true }
request = request("set-dismiss-springboard-alerts-automatically", parameters)
client = http_client(http_options)
response = client.post(request)
hash = expect_300_response(response)
hash["is_dismissing_alerts_automatically"]
end

# @!visibility private
def dismiss_springboard_alerts_manually
parameters = { :dismiss_automatically => false }
request = request("set-dismiss-springboard-alerts-automatically", parameters)
client = http_client(http_options)
response = client.post(request)
hash = expect_300_response(response)
hash["is_dismissing_alerts_automatically"]
end

# @!visibility private
# @see #query
Expand Down

0 comments on commit 0aba3bc

Please sign in to comment.