lib/gems/client.rb in gems-1.1.1 vs lib/gems/client.rb in gems-1.2.0

- old
+ new

@@ -31,15 +31,17 @@ # Returns an array of active gems that match the query # # @authenticated false # @param query [String] A term to search for. + # @param options [Hash] A customizable set of options. + # @option options [Integer] :page # @return [Array<Hash>] # @example # Gems.search 'cucumber' - def search(query) - response = get('/api/v1/search.json', :query => query) + def search(query, options = {}) + response = get('/api/v1/search.json', options.merge(:query => query)) JSON.parse(response) end # List all gems that you own # @@ -207,11 +209,11 @@ end # Create a webhook # # @authenticated true - # @param gem_name [String] The name of a gem. Specify "*" to add the hook to all your gems. + # @param gem_name [String] The name of a gem. Specify "*" to add the hook to all gems. # @param url [String] The URL of the web hook. # @return [String] # @example # Gems.add_web_hook 'rails', 'http://example.com' def add_web_hook(gem_name, url) @@ -219,11 +221,11 @@ end # Remove a webhook # # @authenticated true - # @param gem_name [String] The name of a gem. Specify "*" to remove the hook from all your gems. + # @param gem_name [String] The name of a gem. Specify "*" to remove the hook from all gems. # @param url [String] The URL of the web hook. # @return [String] # @example # Gems.remove_web_hook 'rails', 'http://example.com' def remove_web_hook(gem_name, url) @@ -231,10 +233,10 @@ end # Test fire a webhook # # @authenticated true - # @param gem_name [String] The name of a gem. Specify "*" to fire the hook for all your gems. + # @param gem_name [String] The name of a gem. Specify "*" to fire the hook for all gems. # @param url [String] The URL of the web hook. # @return [String] # @example # Gems.fire_web_hook 'rails', 'http://example.com' def fire_web_hook(gem_name, url)