Socket
Socket
Sign inDemoInstall

mailchimp-buddy

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailchimp-buddy - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

10

lib/index.d.ts

@@ -7,7 +7,7 @@ import { AxiosResponse } from 'axios';

export default function (config: Config): {
list(config: Config): Promise<AxiosResponse<any>>;
subscribe(email: string, config: Config): Promise<AxiosResponse<any>>;
unsubscribe(email: string, config: Config): Promise<AxiosResponse<any>>;
subscribeIfNew(email: string, config: Config): Promise<AxiosResponse<any>>;
remove(email: string, config: Config): Promise<AxiosResponse<any>>;
list(): Promise<AxiosResponse<any>>;
subscribe(email: string): Promise<AxiosResponse<any>>;
unsubscribe(email: string): Promise<AxiosResponse<any>>;
subscribeIfNew(email: string): Promise<AxiosResponse<any>>;
remove(email: string): Promise<AxiosResponse<any>>;
};

@@ -18,3 +18,3 @@ "use strict";

return {
list(config) {
list() {
return __awaiter(this, void 0, void 0, function* () {

@@ -24,15 +24,15 @@ return yield axios_1.default.get(baseUrl, { headers });

},
subscribe(email, config) {
subscribe(email) {
return __awaiter(this, void 0, void 0, function* () {
const data = { status: 'subscribed' };
return yield axios_1.default.post(`${baseUrl}/${md5(email)}`, data, { headers });
return yield axios_1.default.patch(`${baseUrl}/${md5(email)}`, data, { headers });
});
},
unsubscribe(email, config) {
unsubscribe(email) {
return __awaiter(this, void 0, void 0, function* () {
const data = { status: 'unsubscribed' };
return yield axios_1.default.post(`${baseUrl}/${md5(email)}`, data, { headers });
return yield axios_1.default.patch(`${baseUrl}/${md5(email)}`, data, { headers });
});
},
subscribeIfNew(email, config) {
subscribeIfNew(email) {
return __awaiter(this, void 0, void 0, function* () {

@@ -43,3 +43,3 @@ const data = { email_address: email, status_if_new: 'subscribed' };

},
remove(email, config) {
remove(email) {
return __awaiter(this, void 0, void 0, function* () {

@@ -46,0 +46,0 @@ return yield axios_1.default.delete(`${baseUrl}/${md5(email)}`, { headers });

{
"name": "mailchimp-buddy",
"version": "0.0.1",
"version": "0.0.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index",

@@ -21,7 +21,7 @@ import * as crypto from 'crypto';

return {
async list(config: Config) {
async list() {
return await axios.get(baseUrl, { headers });
},
async subscribe(email: string, config: Config) {
async subscribe(email: string) {
const data = { status: 'subscribed' };

@@ -31,3 +31,3 @@ return await axios.patch(`${baseUrl}/${md5(email)}`, data, { headers });

async unsubscribe(email: string, config: Config) {
async unsubscribe(email: string) {
const data = { status: 'unsubscribed' };

@@ -37,3 +37,3 @@ return await axios.patch(`${baseUrl}/${md5(email)}`, data, { headers });

async subscribeIfNew(email: string, config: Config) {
async subscribeIfNew(email: string) {
const data = { email_address: email, status_if_new: 'subscribed' };

@@ -43,3 +43,3 @@ return await axios.put(`${baseUrl}/${md5(email)}`, data, { headers });

async remove(email: string, config: Config) {
async remove(email: string) {
return await axios.delete(`${baseUrl}/${md5(email)}`, { headers });

@@ -46,0 +46,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc