lib/slack/endpoint/dnd.rb in slack-api-1.4.0 vs lib/slack/endpoint/dnd.rb in slack-api-1.5.0

- old
+ new

@@ -8,22 +8,20 @@ # # @see https://api.slack.com/methods/dnd.endDnd # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.endDnd.md # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.endDnd.json def dnd_endDnd(options={}) - options[:attachments] = options[:attachments].to_json if Hash === options[:attachments] post("dnd.endDnd", options) end # # Ends the current user's snooze mode immediately. # # @see https://api.slack.com/methods/dnd.endSnooze # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.endSnooze.md # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.endSnooze.json def dnd_endSnooze(options={}) - options[:attachments] = options[:attachments].to_json if Hash === options[:attachments] post("dnd.endSnooze", options) end # # Provides information about a user's current Do Not Disturb settings. @@ -32,11 +30,10 @@ # User to fetch status for (defaults to current user) # @see https://api.slack.com/methods/dnd.info # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.info.md # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.info.json def dnd_info(options={}) - options[:attachments] = options[:attachments].to_json if Hash === options[:attachments] post("dnd.info", options) end # # Adjusts the snooze duration for a user's Do Not Disturb settings. If a snooze session is not already active for the user, invoking this method will begin one for the specified duration. @@ -46,11 +43,10 @@ # @see https://api.slack.com/methods/dnd.setSnooze # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.setSnooze.md # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.setSnooze.json def dnd_setSnooze(options={}) throw ArgumentError.new("Required arguments :num_minutes missing") if options[:num_minutes].nil? - options[:attachments] = options[:attachments].to_json if Hash === options[:attachments] post("dnd.setSnooze", options) end # # Provides information about the current Do Not Disturb settings for users of a Slack team. @@ -59,10 +55,9 @@ # Comma-separated list of users to fetch Do Not Disturb status for # @see https://api.slack.com/methods/dnd.teamInfo # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.teamInfo.md # @see https://github.com/aki017/slack-api-docs/blob/master/methods/dnd.teamInfo.json def dnd_teamInfo(options={}) - options[:attachments] = options[:attachments].to_json if Hash === options[:attachments] post("dnd.teamInfo", options) end end end