mailgun.js 3.6.1 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/.eslintrc +8 -6
  2. package/CHANGELOG.md +7 -0
  3. package/dist/index.d.ts +1 -1
  4. package/dist/lib/client.d.ts +1 -1
  5. package/dist/lib/events.d.ts +9 -25
  6. package/dist/lib/interfaces/APIErrorOptions.d.ts +2 -1
  7. package/dist/lib/interfaces/ApiResponse.d.ts +2 -1
  8. package/dist/lib/interfaces/Events.d.ts +24 -0
  9. package/dist/lib/interfaces/IpPools.d.ts +12 -0
  10. package/dist/lib/interfaces/Options.d.ts +2 -1
  11. package/dist/lib/interfaces/RequestOptions.d.ts +2 -1
  12. package/dist/lib/interfaces/StatsOptions.d.ts +2 -1
  13. package/dist/lib/interfaces/mailListMembers.d.ts +6 -6
  14. package/dist/lib/ip-pools.d.ts +11 -14
  15. package/dist/lib/ips.d.ts +6 -6
  16. package/dist/lib/messages.d.ts +1 -1
  17. package/dist/lib/suppressions.d.ts +1 -1
  18. package/dist/mailgun.node.js +2 -2
  19. package/dist/mailgun.node.js.LICENSE.txt +1 -1
  20. package/dist/mailgun.web.js +2 -2
  21. package/dist/mailgun.web.js.LICENSE.txt +1 -1
  22. package/examples/addresses.js +1 -0
  23. package/examples/list-domains.js +1 -0
  24. package/examples/send-email.js +1 -0
  25. package/index.ts +1 -1
  26. package/lib/client.ts +3 -2
  27. package/lib/events.ts +21 -19
  28. package/lib/interfaces/APIErrorOptions.ts +3 -1
  29. package/lib/interfaces/ApiResponse.ts +3 -1
  30. package/lib/interfaces/Events.ts +25 -0
  31. package/lib/interfaces/IFormData.ts +4 -3
  32. package/lib/interfaces/IpPools.ts +16 -1
  33. package/lib/interfaces/Ips.ts +1 -0
  34. package/lib/interfaces/Options.ts +5 -2
  35. package/lib/interfaces/RequestOptions.ts +4 -2
  36. package/lib/interfaces/StatsOptions.ts +4 -2
  37. package/lib/interfaces/Supressions.ts +1 -1
  38. package/lib/interfaces/lists.ts +1 -0
  39. package/lib/interfaces/mailListMembers.ts +18 -12
  40. package/lib/interfaces/routes.ts +1 -0
  41. package/lib/ip-pools.ts +8 -7
  42. package/lib/ips.ts +3 -3
  43. package/lib/lists.ts +1 -1
  44. package/lib/messages.ts +1 -1
  45. package/lib/parse.ts +4 -3
  46. package/lib/stats.ts +3 -2
  47. package/lib/suppressions.ts +16 -11
  48. package/lib/validate.ts +0 -1
  49. package/package.json +1 -1
  50. package/test/client.test.ts +7 -2
  51. package/test/events.test.ts +1 -1
  52. package/test/ips.test.ts +1 -1
  53. package/test/lists.test.ts +5 -6
  54. package/test/mailListMembers.test.ts +47 -42
  55. package/test/messageAttachment.test.ts +3 -3
  56. package/test/messages.test.ts +1 -1
  57. package/test/parse.test.ts +1 -1
  58. package/test/routes.test.ts +1 -0
  59. package/test/suppressions.test.ts +4 -3
@@ -4,4 +4,4 @@
4
4
 
5
5
  /*! https://mths.be/punycode v1.3.2 by @mathias */
6
6
 
7
- /*! mailgun.js v3.6.0 */
7
+ /*! mailgun.js v3.6.1 */
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-console */
1
2
  const mailgun = require('../index');
2
3
 
3
4
  const mg = mailgun.client({
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-console */
1
2
  const mailgun = require('../index');
2
3
 
3
4
  const mg = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY || '' });
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-console */
1
2
  const fs = require('fs');
2
3
  const mailgun = require('../index');
3
4
 
package/index.ts CHANGED
@@ -5,7 +5,7 @@ import IFormData from './lib/interfaces/IFormData';
5
5
  class Mailgun {
6
6
  private formData: new () => IFormData
7
7
 
8
- constructor(FormData: new (...args: any[]) => IFormData) {
8
+ constructor(FormData: new (...args: unknown[]) => IFormData) {
9
9
  this.formData = FormData;
10
10
  }
11
11
 
package/lib/client.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /* eslint-disable camelcase */
1
2
  import Request from './request';
2
3
  import Options from './interfaces/Options';
3
4
  import RequestOptions from './interfaces/RequestOptions';
@@ -34,11 +35,11 @@ export default class Client {
34
35
  public ip_pools;
35
36
  public lists;
36
37
 
37
- constructor(options: Options, formData: new (...args: any[]) => IFormData) {
38
+ constructor(options: Options, formData: new (...args: unknown[]) => IFormData) {
38
39
  const config: RequestOptions = { ...options } as RequestOptions;
39
40
 
40
41
  if (!config.url) {
41
- config.url = 'https://api.mailgun.net'
42
+ config.url = 'https://api.mailgun.net';
42
43
  }
43
44
 
44
45
  if (!config.username) {
package/lib/events.ts CHANGED
@@ -1,52 +1,54 @@
1
- const urljoin = require('url-join');
1
+ import urljoin from 'url-join';
2
+ import {
3
+ EventsList, EventsPage, EventsResponse, PagesList, PagesListAccumulator
4
+ } from './interfaces/Events';
2
5
 
3
- const MgRequest = require('./request');
6
+ import Request from './request';
4
7
 
5
8
  export default class EventClient {
6
- request: typeof MgRequest;
9
+ request: Request;
7
10
 
8
- constructor(request: typeof MgRequest) {
11
+ constructor(request: Request) {
9
12
  this.request = request;
10
13
  }
11
14
 
12
- _parsePageNumber(url: string) {
15
+ _parsePageNumber(url: string) : string {
13
16
  return url.split('/').pop();
14
17
  }
15
18
 
16
- _parsePage(id: string, url: string) {
19
+ _parsePage(id: string, url: string) : EventsPage {
17
20
  return { id, number: this._parsePageNumber(url), url };
18
21
  }
19
22
 
20
- _parsePageLinks(response: { body: { paging: any } }) {
21
- const pages = Object.entries(response.body.paging);
23
+ _parsePageLinks(response: EventsResponse) : PagesList {
24
+ const pages = Object.entries(response.body.paging as PagesList);
22
25
  return pages.reduce(
23
- (acc: any, entrie: [url: string, id: string]) => {
26
+ (acc: PagesListAccumulator, entrie: [url: string, id: string]) => {
24
27
  const id = entrie[0];
25
28
  const url = entrie[1];
26
29
  acc[id] = this._parsePage(id, url);
27
30
  return acc;
28
31
  }, {}
29
- );
32
+ ) as unknown as PagesList;
30
33
  }
31
34
 
32
- _parseEventList(response: { body: { items: any, paging: any } }) {
35
+ _parseEventList(response: EventsResponse) : EventsList {
33
36
  return {
34
37
  items: response.body.items,
35
38
  pages: this._parsePageLinks(response)
36
39
  };
37
40
  }
38
41
 
39
- get(domain: string, query: { page: any }) {
42
+ get(domain: string, query: { page: string }) : Promise<EventsList> {
40
43
  let url;
41
-
42
- if (query && query.page) {
43
- url = urljoin('/v2', domain, 'events', query.page);
44
- delete query.page;
44
+ const queryCopy = { ...query };
45
+ if (queryCopy && queryCopy.page) {
46
+ url = urljoin('/v2', domain, 'events', queryCopy.page);
47
+ delete queryCopy.page;
45
48
  } else {
46
49
  url = urljoin('/v2', domain, 'events');
47
50
  }
48
-
49
- return this.request.get(url, query)
50
- .then((response: { body: { items: any, paging: any } }) => this._parseEventList(response));
51
+ return this.request.get(url, queryCopy)
52
+ .then((response: EventsResponse) => this._parseEventList(response));
51
53
  }
52
54
  }
@@ -1,4 +1,4 @@
1
- export default interface APIErrorOptions {
1
+ interface APIErrorOptions {
2
2
  headers: { [key: string]: any };
3
3
  status: number | string;
4
4
  message: string;
@@ -6,3 +6,5 @@ export default interface APIErrorOptions {
6
6
  url: string;
7
7
  statusText: string;
8
8
  }
9
+
10
+ export default APIErrorOptions;
@@ -1,4 +1,6 @@
1
- export default interface APIResponse {
1
+ interface APIResponse {
2
2
  status: number;
3
3
  body: any;
4
4
  }
5
+
6
+ export default APIResponse;
@@ -0,0 +1,25 @@
1
+ export interface EventsPage {
2
+ id: string;
3
+ number: string;
4
+ url: string;
5
+ }
6
+ export interface PagesList {
7
+ previous: string;
8
+ first: string;
9
+ last: string;
10
+ next: string;
11
+ }
12
+ export interface EventsResponse {
13
+ body: {
14
+ items: [];
15
+ paging: PagesList;
16
+ }
17
+ }
18
+
19
+ export interface EventsList {
20
+ items: [];
21
+ pages: PagesList;
22
+ }
23
+ export interface PagesListAccumulator {
24
+ [index: string]: EventsPage
25
+ }
@@ -11,8 +11,9 @@ interface AppendOptions {
11
11
  }
12
12
 
13
13
  export default abstract class IFormData {
14
- constructor(){ //description of type. Should not be used for creating objects
15
- }
14
+ // eslint-disable-next-line no-useless-constructor
15
+ constructor() { // description of type. Should not be used for creating objects
16
+ }
16
17
 
17
- abstract append(key: string, value: any, options?: AppendOptions | string): void
18
+ abstract append(key: string, value: any, options?: AppendOptions | string): void
18
19
  }
@@ -1,7 +1,22 @@
1
+ /* eslint-disable camelcase */
1
2
  export interface IpPool {
2
3
  description: string;
3
4
  ips: string[];
4
5
  is_linked: boolean;
5
6
  name: string;
6
7
  pool_id: string;
7
- }
8
+ }
9
+
10
+ export interface IpPoolListResponse {
11
+ body: {
12
+ ip_pools: IpPool,
13
+ message: string
14
+ }
15
+ }
16
+
17
+ export interface IpPoolUpdateData {
18
+ name: string,
19
+ description: string,
20
+ add_ip: string,
21
+ remove_ip: string
22
+ }
@@ -1,3 +1,4 @@
1
+ /* eslint-disable camelcase */
1
2
  export interface IpsListResponseBody {
2
3
  assignable_to_pools: boolean;
3
4
  items: string[];
@@ -1,7 +1,10 @@
1
- export default interface Options {
1
+ /* eslint-disable camelcase */
2
+ interface Options {
2
3
  username: string;
3
4
  key: string;
4
5
  url?: string;
5
6
  public_key?: string;
6
7
  timeout?: number;
7
- }
8
+ }
9
+
10
+ export default Options;
@@ -1,6 +1,8 @@
1
1
  import Options from './Options';
2
2
 
3
- export default interface RequestOptions extends Options {
3
+ interface RequestOptions extends Options {
4
4
  headers: any;
5
5
  timeout: number;
6
- }
6
+ }
7
+
8
+ export default RequestOptions;
@@ -1,4 +1,4 @@
1
- export default interface StatsOptions {
1
+ interface StatsOptions {
2
2
  start: string | Date;
3
3
  end: string | Date;
4
4
  resolution: string;
@@ -10,4 +10,6 @@ export default interface StatsOptions {
10
10
  total: number
11
11
  }
12
12
  }[];
13
- }
13
+ }
14
+
15
+ export default StatsOptions;
@@ -1,3 +1,4 @@
1
+ /* eslint-disable camelcase */
1
2
  export interface BounceData {
2
3
  address: string;
3
4
  code: number;
@@ -15,4 +16,3 @@ export interface UnsubscribeData {
15
16
  tags: any;
16
17
  created_at: string | Date;
17
18
  }
18
-
@@ -1,3 +1,4 @@
1
+ /* eslint-disable camelcase */
1
2
  export interface ListsQuery {
2
3
  address?: string;
3
4
  limit?: number;
@@ -1,5 +1,11 @@
1
- import {MailingList} from './lists';
1
+ import { MailingList } from './lists';
2
2
 
3
+ export interface MailListMember {
4
+ address: string;
5
+ name: string;
6
+ subscribed: boolean,
7
+ vars: string | any;
8
+ }
3
9
  export interface MailListMembersQuery {
4
10
  subscribed?: 'yes' | 'no';
5
11
  limit?: number;
@@ -31,13 +37,6 @@ export interface CreateUpdateMailListMembersReq {
31
37
  upsert?: 'yes' | 'no';
32
38
  }
33
39
 
34
- export interface MailListMember {
35
- address: string;
36
- name: string;
37
- subscribed: boolean,
38
- vars: string | any;
39
- }
40
-
41
40
  export interface DeletedMember {
42
41
  member: {
43
42
  address: string;
@@ -54,8 +53,15 @@ export interface NewMultipleMembersResponse {
54
53
  export interface IMailListsMembers {
55
54
  listMembers(mailListAddress: string, query?: MailListMembersQuery): Promise<MailListMember[]>;
56
55
  getMember(address: string, memberAddress: string): Promise<MailListMember>,
57
- createMember(mailListAddress: string, data: CreateUpdateMailListMembers): Promise<MailListMember>,
58
- createMembers(mailListAddress: string, data: MultipleMembersData): Promise<NewMultipleMembersResponse>,
59
- updateMember(address : string, memberAddress: string, data:CreateUpdateMailListMembers): Promise<MailListMember> ,
56
+ createMember(
57
+ mailListAddress: string,
58
+ data: CreateUpdateMailListMembers): Promise<MailListMember>,
59
+ createMembers(
60
+ mailListAddress: string,
61
+ data: MultipleMembersData): Promise<NewMultipleMembersResponse>,
62
+ updateMember(
63
+ address: string,
64
+ memberAddress: string,
65
+ data: CreateUpdateMailListMembers): Promise<MailListMember>,
60
66
  destroyMember(address : string, memberAddress: string): Promise<DeletedMember>
61
- }
67
+ }
@@ -1,3 +1,4 @@
1
+ /* eslint-disable camelcase */
1
2
  export interface Route {
2
3
  actions: string[];
3
4
  created_at: string;
package/lib/ip-pools.ts CHANGED
@@ -1,17 +1,18 @@
1
- const MgRequest = require('./request');
1
+ /* eslint-disable camelcase */
2
+ import Request from './request';
2
3
 
3
- import { IpPool } from "./interfaces/IpPools";
4
+ import { IpPool, IpPoolListResponse, IpPoolUpdateData } from './interfaces/IpPools';
4
5
 
5
6
  export default class IpPoolsClient {
6
- request: typeof MgRequest;
7
+ request: Request;
7
8
 
8
- constructor(request: typeof MgRequest) {
9
+ constructor(request: Request) {
9
10
  this.request = request;
10
11
  }
11
12
 
12
- list(query: any): IpPool[] {
13
+ list(query: any): Promise<IpPool[]> {
13
14
  return this.request.get('/v1/ip_pools', query)
14
- .then((response: { body: { ip_pools: IpPool, message: string } }) => this.parseIpPoolsResponse(response));
15
+ .then((response: IpPoolListResponse) => this.parseIpPoolsResponse(response));
15
16
  }
16
17
 
17
18
  create(data: { name: string, description?: string, ips?: string[] }) {
@@ -19,7 +20,7 @@ export default class IpPoolsClient {
19
20
  .then((response: { body: { message: string, pool_id: string } }) => response?.body);
20
21
  }
21
22
 
22
- update(poolId: string, data: { name: string, description: string, add_ip: string, remove_ip: string }) {
23
+ update(poolId: string, data: IpPoolUpdateData) : Promise<any> {
23
24
  return this.request.patch(`/v1/ip_pools/${poolId}`, data)
24
25
  .then((response: { body: any }) => response?.body);
25
26
  }
package/lib/ips.ts CHANGED
@@ -1,10 +1,10 @@
1
- const MgRequest = require('./request');
1
+ import MgRequest from './request';
2
2
  import { IpData, IpsListResponseBody } from './interfaces/Ips';
3
3
 
4
4
  export default class IpsClient {
5
- request: typeof MgRequest;
5
+ request: MgRequest;
6
6
 
7
- constructor(request: typeof MgRequest) {
7
+ constructor(request: MgRequest) {
8
8
  this.request = request;
9
9
  }
10
10
 
package/lib/lists.ts CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  DestroyedList,
6
6
  MailingList
7
7
  } from './interfaces/lists';
8
- import {IMailListsMembers} from './interfaces/mailListMembers';
8
+ import { IMailListsMembers } from './interfaces/mailListMembers';
9
9
 
10
10
  export default class ListsClient {
11
11
  baseRoute: string;
package/lib/messages.ts CHANGED
@@ -1,4 +1,4 @@
1
- import Request from "./request";
1
+ import Request from './request';
2
2
 
3
3
  export default class MessagesClient {
4
4
  request: Request;
package/lib/parse.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /* eslint-disable camelcase */
1
2
  import Request from './request';
2
3
 
3
4
  export default class ParseClient {
@@ -11,11 +12,11 @@ export default class ParseClient {
11
12
  const query = {} as { addresses: string, syntax_only: boolean };
12
13
 
13
14
  if (Array.isArray(addresses)) {
14
- addresses = addresses.join(',');
15
+ query.addresses = addresses.join(',');
16
+ } else {
17
+ query.addresses = addresses;
15
18
  }
16
19
 
17
- query.addresses = addresses;
18
-
19
20
  if (enableDnsEspChecks) {
20
21
  query.syntax_only = false;
21
22
  }
package/lib/stats.ts CHANGED
@@ -13,8 +13,9 @@ class Stats {
13
13
  this.end = new Date(data.end);
14
14
  this.resolution = data.resolution;
15
15
  this.stats = data.stats.map(function (stat: { time: string | Date }) {
16
- stat.time = new Date(stat.time);
17
- return stat;
16
+ const res = { ...stat };
17
+ res.time = new Date(stat.time);
18
+ return res;
18
19
  });
19
20
  }
20
21
  }
@@ -1,11 +1,10 @@
1
+ /* eslint-disable camelcase */
1
2
  import url from 'url';
2
3
  import urljoin from 'url-join';
3
4
 
4
5
  import Request from './request';
5
6
  import { BounceData, ComplaintData, UnsubscribeData } from './interfaces/Supressions';
6
7
 
7
- type TModel = typeof Bounce | typeof Complaint | typeof Unsubscribe;
8
-
9
8
  const createOptions = {
10
9
  headers: { 'Content-Type': 'application/json' }
11
10
  };
@@ -52,6 +51,8 @@ class Unsubscribe {
52
51
  }
53
52
  }
54
53
 
54
+ type TModel = typeof Bounce | typeof Complaint | typeof Unsubscribe;
55
+
55
56
  export default class SuppressionClient {
56
57
  request: any;
57
58
  models: {
@@ -84,10 +85,11 @@ export default class SuppressionClient {
84
85
  _parsePageLinks(response: { body: { paging: any } }) {
85
86
  const pages = Object.entries(response.body.paging);
86
87
  return pages.reduce(
87
- (acc: any, [id, url]: [url: string, id: string]) => {
88
- acc[id] = this._parsePage(id, url)
89
- return acc
90
- }, {});
88
+ (acc: any, [id, pageUrl]: [pageUrl: string, id: string]) => {
89
+ acc[id] = this._parsePage(id, pageUrl);
90
+ return acc;
91
+ }, {}
92
+ );
91
93
  }
92
94
 
93
95
  _parseList(response: { body: { items: any, paging: any } }, Model: TModel) {
@@ -122,19 +124,22 @@ export default class SuppressionClient {
122
124
 
123
125
  create(domain: string, type: string, data: any) {
124
126
  // supports adding multiple suppressions by default
127
+ let postData;
125
128
  if (!Array.isArray(data)) {
126
- data = [data];
129
+ postData = [data];
130
+ } else {
131
+ postData = { ...data };
127
132
  }
128
133
 
129
134
  return this.request
130
- .post(urljoin('v3', domain, type), data, createOptions)
131
- .then((response: { body: any }) => response.body);
135
+ .post(urljoin('v3', domain, type), postData, createOptions)
136
+ .then((response: { body: any }) => response.body);
132
137
  }
133
138
 
134
139
  destroy(domain: string, type: string, address: string) {
135
140
  return this.request
136
- .delete(urljoin('v3', domain, type, encodeURIComponent(address)))
137
- .then((response: { body: any }) => response.body);
141
+ .delete(urljoin('v3', domain, type, encodeURIComponent(address)))
142
+ .then((response: { body: any }) => response.body);
138
143
  }
139
144
  }
140
145
 
package/lib/validate.ts CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  import Request from './request';
3
2
 
4
3
  export default class ValidateClient {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailgun.js",
3
- "version": "3.6.1",
3
+ "version": "3.7.0",
4
4
  "main": "dist/mailgun.node.js",
5
5
  "browser": "dist/mailgun.web.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,13 +17,18 @@ describe('Client', function () {
17
17
  let client: any;
18
18
 
19
19
  beforeEach(function () {
20
- client = new Client({ username: 'username', key: 'key', public_key: 'key', timeout: 10000 }, formData);
20
+ client = new Client({
21
+ username: 'username',
22
+ key: 'key',
23
+ public_key: 'key',
24
+ timeout: 10000
25
+ }, formData);
21
26
  });
22
27
 
23
28
  it('raises error when username is not provided', function () {
24
29
  expect(
25
30
  function () {
26
- return new Client({ key: 'key' } as any, formData)
31
+ return new Client({ key: 'key' } as any, formData);
27
32
  }
28
33
  ).to.throw('Parameter "username" is required');
29
34
  });
@@ -1,7 +1,7 @@
1
1
  import nock from 'nock';
2
2
 
3
- import EventClient from '../lib/events';
4
3
  import formData from 'form-data';
4
+ import EventClient from '../lib/events';
5
5
  import MgRequest from '../lib/request';
6
6
  import RequestOptions from '../lib/interfaces/RequestOptions';
7
7
 
package/test/ips.test.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  // const formData = require('form-data');
2
2
 
3
3
  import nock from 'nock';
4
+ import formData from 'form-data';
4
5
  import Request from '../lib/request';
5
6
  import RequestOptions from '../lib/interfaces/RequestOptions';
6
7
  import IpsClient from '../lib/ips';
7
- import formData from 'form-data';
8
8
 
9
9
  import { IpData, IpsListResponseBody } from '../lib/interfaces/Ips';
10
10
 
@@ -1,10 +1,11 @@
1
1
  import nock from 'nock';
2
+ import formData from 'form-data';
3
+
2
4
  import Request from '../lib/request';
3
5
  import ListsClient from '../lib/lists';
4
6
  import RequestOptions from '../lib/interfaces/RequestOptions';
5
7
  import MailListMembers from '../lib/mailListMembers';
6
8
  import { MailingList } from '../lib/interfaces/lists';
7
- import formData from 'form-data';
8
9
 
9
10
  describe('ListsClient', function () {
10
11
  let client: any;
@@ -24,7 +25,7 @@ describe('ListsClient', function () {
24
25
  members_count: 1,
25
26
  name: '123',
26
27
  reply_preference: null
27
- } as MailingList
28
+ } as MailingList;
28
29
  });
29
30
 
30
31
  afterEach(function () {
@@ -39,15 +40,14 @@ describe('ListsClient', function () {
39
40
  items: lists
40
41
  });
41
42
 
42
- return client.list().then(function (lists: MailingList[]) {
43
- lists[0].should.eql(defaultList);
43
+ return client.list().then(function (listsRes: MailingList[]) {
44
+ listsRes[0].should.eql(defaultList);
44
45
  });
45
46
  });
46
47
  });
47
48
 
48
49
  describe('get', function () {
49
50
  it('gets a specific mailing list', function () {
50
-
51
51
  api.get('/v3/lists/testing.example.com').reply(200, {
52
52
  list: defaultList
53
53
  });
@@ -60,7 +60,6 @@ describe('ListsClient', function () {
60
60
 
61
61
  describe('create', function () {
62
62
  it('creates the list', function () {
63
-
64
63
  api.post('/v3/lists').reply(200, {
65
64
  list: defaultList
66
65
  });