Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Node library for performing REST API calls to Salesforce Marketing Cloud (formerly ExactTarget).
This repo used to be located at https://github.com/exacttarget/Fuel-Node-REST
This library allows users access to the Salesforce Marketing Cloud REST API at a low level.
The Salesforce Marketing Cloud SDKs are community-supported projects. The SDK source code, samples, and documentation are publicly available on Github to use as-is or fork and modify for your needs. We invite everyone in the community to collaborate with us on Github and submit pull requests to help improve the source code and samples.
npm install fuel-rest --save
yarn add fuel-rest
new FuelRest(options) - Initialization
options.auth
Object
or FuelAuth Instanceoptions.origin
or options.restEndpoint
String
options.headers
Object
options.globalReqOptions
Object
options
- see request modules optionsoptions.auth
- will be passed into getAccessToken inside Fuel Authoptions.uri
- can either be a full url or a path that is appended to options.origin
used at initialization (url.resolve)options.retry
- boolean value representing whether or not to retry request (and request new token) on 401 invalid token response. default: false
callback
- executed after task is completed.
options
- see apiRequest optionsoptions.retry
- see above for description. default: true
callback
- see apiRequest optionsconst FuelRest = require('fuel-rest');
const options = {
auth: {
// options you want passed when Fuel Auth is initialized
clientId: 'clientId',
clientSecret: 'clientSecret'
},
origin: 'https://alternate.rest.endpoint.com' // default --> https://www.exacttargetapis.com
};
const RestClient = new FuelRest(options);
const options = {
uri: '/platform/v1/endpoints',
headers: {}
// other request options
};
// CANNOT USE BOTH CALLBACKS AND PROMISES TOGETHER
RestClient.get(options, (err, response) => {
if (err) {
// error here
console.log(err);
}
// will be delivered with 200, 400, 401, 500, etc status codes
// response.body === payload from response
// response.res === full response from request client
console.log(response);
});
// or with promises
RestClient.get(options)
.then(response => {
// will be delivered with 200, 400, 401, 500, etc status codes
// response.body === payload from response
// response.res === full response from request client
console.log(response);
})
.catch(err => console.log(err));
We welcome all contributions and issues! There's only one way to make this better, and that's by using it. If you would like to contribute, please checkout our guidelines!
We follow the Node.js Release Schedule. When the current date is past the version's "Maintenance LTS End" it will no longer be supported by this library. A major release on this module will be published when this occurs.
FAQs
Node library for performing REST API calls to Salesforce Marketing Cloud (formerly ExactTarget).
The npm package fuel-rest receives a total of 1,532 weekly downloads. As such, fuel-rest popularity was classified as popular.
We found that fuel-rest 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.