Documentation for Product Version:
If you haven’t already, sign up for a free trial.
The compiled library is available as a Ruby gem:
gem install enzoic
We’ve made calling the API dead simple. This sample code snippet shows you examples of calling the four supported APIs:
require 'enzoic' # Create a new Enzoic instance - this is our primary interface for making API calls enzoic = Enzoic::Enzoic.new(apiKey: YOUR_API_KEY, secret: YOUR_API_SECRET) # Check whether a password has been compromised if enzoic.check_password("password-to-test") puts("Password is compromised") else puts("Password is not compromised") end # Check whether a specific set of credentials are compromised if enzoic.check_credentials("firstname.lastname@example.org", "password-to-test") puts("Credentials are compromised") else puts("Credentials are not compromised") end # get all exposures for a given user exposures = enzoic.get_exposures_for_user("email@example.com") puts(exposures.count.to_s + " exposures found for firstname.lastname@example.org") # now get the full details for the first exposure found details = enzoic.get_exposure_details(exposures.exposures) puts("First exposure for email@example.com was " + details.title)
That should get you started. Check out the Github project page for more details.