lib/pwned.rb in pwned-1.2.1 vs lib/pwned.rb in pwned-2.0.0

- old
+ new

@@ -27,14 +27,14 @@ # @example # Pwned.pwned?("password") #=> true # Pwned.pwned?("pwned::password") #=> false # # @param password [String] The password you want to check against the API. - # @param [Hash] request_options Options that can be passed to +open+ when + # @param [Hash] request_options Options that can be passed to +Net::HTTP.start+ when # calling the API - # @option request_options [String] 'User-Agent' ("Ruby Pwned::Password #{Pwned::VERSION}") - # The user agent used when making an API request. + # @option request_options [Symbol] :headers ({ "User-Agent" => '"Ruby Pwned::Password #{Pwned::VERSION}" }) + # HTTP headers to include in the request # @return [Boolean] Whether the password appears in the data breaches or not. # @since 1.1.0 def self.pwned?(password, request_options={}) Pwned::Password.new(password, request_options).pwned? end @@ -45,13 +45,13 @@ # @example # Pwned.pwned_count("password") #=> 3303003 # Pwned.pwned_count("pwned::password") #=> 0 # # @param password [String] The password you want to check against the API. - # @param [Hash] request_options Options that can be passed to +open+ when + # @param [Hash] request_options Options that can be passed to +Net::HTTP.start+ when # calling the API - # @option request_options [String] 'User-Agent' ("Ruby Pwned::Password #{Pwned::VERSION}") - # The user agent used when making an API request. + # @option request_options [Symbol] :headers ({ "User-Agent" => '"Ruby Pwned::Password #{Pwned::VERSION}" }) + # HTTP headers to include in the request # @return [Integer] The number of times the password has appeared in the data # breaches. # @since 1.1.0 def self.pwned_count(password, request_options={}) Pwned::Password.new(password, request_options).pwned_count