
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
@lancero/node
Advanced tools
This project contains the helper library for interacting with the Lancero API using Node.js.
Installing the latest version can be done through your package manager.
npm i @lancero/node
yarn add @lancero/node
Any interaction you want to make with the Lancero API needs to be done through the Lancero client. You can use a default import to get started.
import Lancero from '@lancero/node';
const lancero = new Lancero("Your secret key");
Used to search for a lead
const lead = await lancero.leads.find("hello@lancero.app");
Used to delete a lead
const lead = await lancero.leads.delete("hello@lancero.app");
Used to create a lead
false
), should this lead be added to the waitlistconst lead = await lancero.leads.create({
email: "hello@lancero.app",
waitlist: true,
});
Used to search for a code
const code = await lancero.codes.find("curious-pineapple");
Used to email a code to leads
const result = await lancero.codes.send({
code: "fantastic-apple",
leads: ["hello@lancero.app", "thelegend27@lancero.app"],
});
Used to delete a code
const code = await lancero.codes.delete("curious-pineapple");
Used to generate codes
1
), how many leads are allowed to claim this code"creative"
), what type of code do you want to generate
"creative"
, a random adjective and noun (e.g. curious-pineapple
)"alphanumeric"
, a 6 character combination of lowercase letters and digits"numeric"
, 6 random digitsconst codes = await lancero.codes.generate({
"amount": 3,
"type": "creative",
"reservedFor": "hello@lancero.app"
});
Used to claim a code.
Note, when using the Node.js library to claim a code we automatically call the exchange endpoint with the received claim token. This claims.exchange()
method should be used when receiving a claim token via the Lancero Portal.
const claim = await lancero.codes.claim({
"code": "curious-pineapple",
"lead": "hello@lancero.app",
});
Used to exchange a unique Lancero claim token for the lead and code.
const claim = await lancero.claims.exchange("4501fa85e737df9af5f91ab4");
Used to exchange a webhook event for data.
const event = await lancero.webhooks.construct("fdbc0cc8-7718-4e4f-a8cb-c969d31b543e");
// Get the type of the event
if (event.data.event === 'LEAD_CREATION') {
// This webhook was triggered because a lead was created
}
if (event.data.event === 'CODE_CREATION') {
// This webhook was triggered because a code was generated
}
if (event.data.event === 'CODE_CLAIM') {
// This webhook was triggered because a code was claimed
}
FAQs
Official Node.js library for Lancero.app
The npm package @lancero/node receives a total of 0 weekly downloads. As such, @lancero/node popularity was classified as not popular.
We found that @lancero/node 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.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.