lib/github_api/gitignore.rb in github_api-0.9.7 vs lib/github_api/gitignore.rb in github_api-0.10.0
- old
+ new
@@ -30,19 +30,20 @@
#
# Use the raw media type to get the raw contents.
#
# = Examples
# github = Github.new
- # github.gitignore.get "template-name", mime: 'applicatin/vnd.github.raw'
+ # github.gitignore.get "template-name", accept: 'applicatin/vnd.github.raw'
#
def get(*args)
params = arguments(args, :required => [:name]).params
- if (mime_type = params.delete('mime'))
- options = { :raw => true, :headers => {'Accept' => mime_type} }
+ if (media = params.delete('accept'))
+ params['accept'] = media
+ params['raw'] = true
end
- get_request("/gitignore/templates/#{name}", params, options || {})
+ get_request("/gitignore/templates/#{name}", params)
end
alias :find :get
end # Gitignore
end # Github