# maildrip

> Interact with Maildrip's apis using this simple Nodejs module. Create, edit and delete campaigns, add and modify recipients to your recipients' list and more from your Node.js environment.

Latest version **1.0.3** (published 2021-12-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install maildrip
pnpm add maildrip
yarn add maildrip
bun add maildrip
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-12-13 |
| First published | 2021-12-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.1 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | Charisol Tech Ltd. |
| Maintainers | olayinka_omosehin |
| Keywords | maildrip, email |

## Links

- npm: https://www.npmjs.com/package/maildrip
- Repository: https://github.com/Challaris/maildrip
- Issues: https://github.com/Challaris/maildrip/issues
- npm.io page: https://npm.io/package/maildrip

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.20.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2021-12-13
- 1.0.2 — 2021-12-13
- 1.0.1 — 2021-12-09
- 1.0.0 — 2021-12-09

## README

# maildrip

Interact with Maildrip's apis using this simple Nodejs module. Create, edit and delete campaigns, add and modify recipients to your recipients' list and more from your Node.js environment.

## Installation

```js
# using npm
npm install maildrip

# using yarn
yarn add maildrip
```


## Usage

```js
const Maildrip = require('maildrip');

const maildrip = Maildrip({
  api_key: XXXXXXXXXXXXXXX,
  access_secret: XXXXXXXXXXXXXXX
})

```
Note: You can get your keys from your Maildrip dashboard. For more information, read our [api documentation](https://app.maildrip.io).


## Examples

### Get ```User``` profile details

#### Using Promises
```js
maildrip.user.getAccountData()
 .then((userdata) => console.log(userdata));
```


#### Using async/await
```js
const getUserData = async function () {
  const userData = maildrip.user.getAccountData()
  console.log(userData);
};

getUserData()
```


### Create a ```Campaign``` 
#### Using Promises
```js
maildrip.campaign.create("My amazing campaign", {
    interval: "10",
    unit: "minutes"
})
.then((campaign) => console.log(campaign));
```


#### Using async/await
```js
const createCampaign = async function () {
  const campaign = maildrip.campaign.create("My amazing campaign", {
    interval: "10",
    unit: "minutes"
  })
  console.log(campaign);
}
createCampaign()
```

Note: The second parameter can either be an object or a number.
In cases where number is specified, the unit default will be minutes 


### Add a ```Recipient``` to a Campaign

#### Using Promises
```js
maildrip.recipient.add(campaignId, {
     name: "My recipient",
     email: "myrecipient@mail.com"
})
.then((recipient) => console.log(recipient));
```


#### Using async/await
```js
const addRecipient = async function () {
  const recipient = await maildrip.recipient.add(campaignId, {
     name: "My recipient",
     email: "myrecipient@mail.com"
  })
  console.log(recipient);
}
addRecipient()
```
Note: You can find your campaignId in the campaign settings tab on your Maildrip dashboard. 

### More APIs?

Can't get enough? Read more of our [api documentation](https://app.maildrip.io).

---
_Source: https://npm.io/package/maildrip · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
