
Security News
Nx npm Packages Compromised in Supply Chain Attack Leveraging AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Ruby wrapper for the Impermium API.
In order to use Impermium gem you must get an Impermium API key.
The Impermium client can be instantiated and configured in several ways. A new client can be created with:
client = Impermium.new(:api_key => <your_api_key>)
which is actually short for
client = Impermium::Client.new(:api_key => <your_api_key>)
Constructor accepts a hash of options that can be used to configure the Impermium client. Valid hash keys are:
:adapter
(sets Faraday adapter):api_version
(sets Impermium API version - default 3.1):api_key
(sets API key):client_name
(sets client name):client_id
(sets client ID):endpoint
(sets URL to Impermium server - default http://api.impermium.com)Any of these values can be set directly too:
Finally, the Impermium client can be configured through a block with:
Impermium.configure do |conf|
conf.api_key = <your_api_key>
conf.endpoint = "http://api-test.impermium.com"
end
client = Impermium.new
Each method accepts the mandatory arguments of the corresponding API call, and takes an options hash and a block as optional arguments. Here is the list of all supported methods and their mandatory arguments:
USER
client.account(user_id, enduser_ip)
client.account_attempt(enduser_ip)
client.account_login(user_id, enduser_ip)
client.account_analyst_feedback(analyst_id, user_id, desired_result)
client.account_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, user_id, desired_result)
client.profile(user_id, profile_id, enduser_ip)
client.profile_analyst_feedback(profile_id, analyst_id, desired_result)
client.profile_user_feedback(profile_id, rep_usr_id, rep_usr_type, reporter_ip, desired_result)
CONTENT
client.blog_post(user_id, blog_post_id, content, blog_post_permalink, blog_url, enduser_ip)
client.blog_post_analyst_feedback(analyst_id, blog_post_id, desired_result)
client.blog_post_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, blog_post_id, desired_result)
client.bookmark(user_id, bookmark_id, bookmark_url, enduser_ip)
client.bookmark_like(user_id, bookmark_id, bookmark_url, like_value, enduser_ip)
client.bookmark_analyst_feedback(analyst_id, bookmark_id, desired_result)
client.bookmark_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, bookmark_id, desired_result)
client.comment(user_id, comment_id, content, comment_permalink, article_permalink, enduser_ip)
client.comment_analyst_feedback(analyst_id, comment_id, desired_result)
client.comment_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, comment_id, desired_result)
client.connection(operation, connection_type, connection_id, requester_user_id, responder_user_id, enduser_ip)
client.connection_analyst_feedback(analyst_id, connection_type, connection_id, desired_result)
client.connection_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, connection_type, connection_id, desired_result)
client.listing(user_id, listing_id, content, listing_permalink, enduser_ip)
client.listing_analyst_feedback(analyst_id, listing_id, desired_result)
client.listing_user_feedback(rep_usr_id, rep_usr_type, reporter_ip, listing_id, desired_result)
Additional arguments can be passed through the hash which is the last argument for every method
client.account('33', '255.255.255.255', {:alias => "user33", :password_hash=>'7d222a5d269a'})
If request headers have to be set it can be done through a block:
Impermium.account('33', '255.255.255.255') do |req|
req.headers = {:http_user_agent => "Impermium gem 1.0.0"}
end
You can find the complete arguments lists and types in the official Impermium API docs site.
Any method call receiving a successful response from impermium API will return a Hash-like structure containing the body of the response, typically including response_id
, timestamp
and possibly spam_classifier
and any other additional classifiers.
Any 4XX response will raise an Impermium Exception with the body of the response in the error message.
Impermium::BadRequest
Impermium::UnauthorizedRequest
Impermium::ForbiddenRequest
Impermium::NotFoundRequest
Here is the list of contributors.
Copyright 2012 WHI Inc. (weheartit.com), released under the MIT license.
FAQs
Unknown package
We found that impermium demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.