mailchimp-buddy
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -13,3 +13,3 @@ import { AxiosResponse } from 'axios'; | ||
export default function (config: Config): { | ||
list(): Promise<AxiosResponse<{ | ||
list(count?: number, offset?: number): Promise<AxiosResponse<{ | ||
members: Member[]; | ||
@@ -16,0 +16,0 @@ }>>; |
@@ -19,5 +19,5 @@ "use strict"; | ||
return { | ||
list() { | ||
list(count = 1000000, offset = 0) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default.get(`${baseUrl}?count=1000000`, { headers }); | ||
return yield axios_1.default.get(`${baseUrl}?count=${count}&offset=${offset}`, { headers }); | ||
}); | ||
@@ -24,0 +24,0 @@ }, |
{ | ||
"name": "mailchimp-buddy", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
@@ -24,4 +24,4 @@ import * as crypto from 'crypto'; | ||
return { | ||
async list(): Promise<AxiosResponse<{ members: Member[] }>> { | ||
return await axios.get<{ members: Member[] }>(`${baseUrl}?count=1000000`, { headers }); | ||
async list(count = 1000000, offset = 0): Promise<AxiosResponse<{ members: Member[] }>> { | ||
return await axios.get<{ members: Member[] }>(`${baseUrl}?count=${count}&offset=${offset}`, { headers }); | ||
}, | ||
@@ -28,0 +28,0 @@ |
5642
6
123