lib/slack/web/api/templates/method.erb in slack-ruby-client-0.14.6 vs lib/slack/web/api/templates/method.erb in slack-ruby-client-0.15.0

- old
+ new

@@ -38,16 +38,19 @@ throw ArgumentError.new('Required arguments :<%= arg_name %> missing') if options[:<%= arg_name %>].nil? <% end %> <% if data['group'] == 'groups' && data['args']['channel'] && !data['args']['channel']['desc'].include?('Can be an encoded ID, or a name.') %> options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel] <% elsif data['args']['channel'] && !data['args']['channel']['desc'].include?('Can be an encoded ID, or a name.') %> - options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] + options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel] <% end %> <% if data['args']['user'] %> options = options.merge(user: users_id(options)['user']['id']) if options[:user] <% end %> <% if data['undocumented'] %> logger.warn('The <%= group %>.<%= name %> method is undocumented.') +<% end %> +<% if data['deprecated'] %> + logger.warn('<%= group %>.<%= name %>: <%= data['deprecation']['deprecation_warning']%> Alternative methods: <%= data['deprecation']['alternative_methods'].join(', ')%>.') <% end %> <% if data['args'].keys.include?('cursor') %> if block_given? Pagination::Cursor.new(self, :<%= group.gsub(".", "_") %>_<%= name %>, options).each do |page| yield page