
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
ExactTarget Fuel SDK / SalesforceMarektingCloudSDK for Ruby
The Fuel SDK for Ruby provides easy access to ExactTarget's Fuel API Family services, including a collection of REST APIs and a SOAP API. These APIs provide access to ExactTarget functionality via common collection types such as array/hash.
Build the gem from the source
gem build marketingcloudsdk.gemspec
Install the newly built gem
gem install marketingcloudsdk-1.1.0.gem
If you have not registered your application or you need to lookup your Application Key or Application Signature values, please go to App Center at Code@: ExactTarget's Developer Community.
Add a require statement to reference the SalesforceMarketingCloud SDK's functionality:
require 'marketingcloudsdk'
Next, create an instance of the Client class:
myClient = MarketingCloudSDK::Client.new {'client' => { 'id' => CLIENTID, 'secret' => SECRET }}
Create an instance of the object type we want to work with:
list = MarketingCloudSDK::List.new
Associate the Client to the object using the client property:
list.client = myClient
Utilize one of the List methods:
response = list.get
Print out the results for viewing
p response
Example Output:
{:overall_status=>"OK", :request_id=>"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", :results=>..} @code= 200, @message= 'OK', @request_id="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", @results= [{:client=>{:id=>"xxxx"}, :partner_key=>nil, :created_date=> #, :id=>"xxxx", :object_id=>nil, :email_address=>"xxxx", :attributes=> [{:name=>"Full Name", :value=>"Justin Barber"}, {:name=>"Gender", :value=>nil}, {:name=>"Email Address", :value=>"xxx"}, {:name=>"User Defined", :value=>"02/02/1982"}], :subscriber_key=>"xxxx", :status=>"Active", :email_type_preference=>"HTML", :"@xsi:type"=>"Subscriber"}, @success=true>
The Client class takes care of many of the required steps when accessing ExactTarget's API, including retrieving appropriate access tokens, handling token state for managing refresh, and determining the appropriate endpoints for API requests. In order to leverage the advantages this class provides, use a single instance of this class for an entire session. Do not instantiate a new Client object for each request made.
Client class accepts multiple parameters
Parameters - Allows for passing authentication information for use with SSO with a JWT or for passing ClientID/ClientSecret. Additionally the API hostname (base_api_url),Authentication URL (request_token_url) and the SOAP endpoint (soap_endpoint) is now configurable:
Example passing ClientID/ClientSecret:
myclient = MarketingCloudSDK::Client.new({'client' => {'id' => 'exampleID','secret' => 'exampleSecret'}})
Example passing ClientID/ClientSecret/AppSignature/JWT:
myclient = MarketingCloudSDK::Client.new({'client' => {'id' => 'exampleID','secret' => 'exampleSecret', 'signature'=>'examplesig'}, 'jwt'=>'exampleJWT'})
Example passing ClientID/ClientSecret/BaseAPIUrl/ReqTokenAuthUrl/Soap Endpoint
myclient = MarketingCloudSDK::Client.new('client' => {'id' => 'exampleID', 'secret' => 'exampleSecret', 'base_api_url' => 'http://getapis', 'request_token_url' => 'http://authapi', 'soap_endpoint' => 'http://soapendpoint'})
Note - The following defaults apply if the following parameters are omitted:
Debug - If 2nd parameter for debug is set to true, all API requests that the Fuel SDK is making behind the scenes will be logged. This option should only be set to true in order to troubleshoot during the development process and should never be used in a production scenario.
myclient = MarketingCloudSDK::Client.new auth, true
All methods on MarketingCloud SDK objects return a generic object that follows the same structure, regardless of the type of call. This object contains a common set of properties used to display details about the request.
Find more sample files that illustrate using all of the available functions for ExactTarget objects exposed through the API in the samples directory.
FAQs
Unknown package
We found that MyPreciousRuby1 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
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.