# This file was auto-generated by lib/generators/tasks/generate.rb

module Slack
  module Endpoint
    module <%= group.capitalize %>
<% names.each do |name, data| %>
      #
<% data["desc"].lines.each do |l| %>
      # <%= l.strip %>
<% end %>
      #
<% data["args"].reject{|k, v| k=="token"}.each do |arg_name, arg_v| %>
      # @option options [<%= arg_v["type"] %>] :<%= arg_name %>
<% arg_v["desc"].lines.each do |l| %>
      #   <%= l.strip %>
<% end %>
<% end %>
      # @see https://api.slack.com/methods/<%= group %>.<%= name %>
      # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/<%= group %>.<%= name %>.md
      # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/<%= group %>.<%= name %>.json
      def <%= group %>_<%= name %>(options={})
<% data["args"].reject{|k, v| k=="token"}.select{|k,v| v["required"]}.each do |arg_name, arg_v| %>
        throw ArgumentError.new("Required arguments :<%= arg_name %> missing") if options[:<%= arg_name %>].nil?
<% end %>
        options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
        post("<%= group %>.<%= name %>", options)
      end

<% end %>
    end
  end
end

# This file was auto-generated by lib/generators/tasks/generate.rb

module Slack
  module Endpoint
    module <%= group.capitalize %>
<% names.each do |name, data| %>
      #
<% data["desc"].lines.each do |l| %>
      # <%= l.strip %>
<% end %>
      #
<% data["args"].reject{|k, v| k=="token"}.each do |arg_name, arg_v| %>
      # @option options [<%= arg_v["type"] %>] :<%= arg_name %>
<% arg_v["desc"].lines.each do |l| %>
      #   <%= l.strip %>
<% end %>
<% end %>
      # @see https://api.slack.com/methods/<%= group %>.<%= name %>
      # @see https://github.com/aki017/slack-api-docs/blob/master/methods/<%= group %>.<%= name %>.md
      # @see https://github.com/aki017/slack-api-docs/blob/master/methods/<%= group %>.<%= name %>.json
      def <%= group %>_<%= name %>(options={})
<% data["args"].reject{|k, v| k=="token"}.select{|k,v| v["required"]}.each do |arg_name, arg_v| %>
        throw ArgumentError.new("Required arguments :<%= arg_name %> missing") if options[:<%= arg_name %>].nil?
<% end %>
        options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
        post("<%= group %>.<%= name %>", options)
      end

<% end %>
    end
  end
end

Change document repository to aki017/slack-api-docs
Change document repository to aki017/slack-api-docs
