Skip to content

Commit 09f6dba

Browse files
authored
Merge pull request #1 from weMail/added-subscriber-tags
Added subscriber tags endpoint
2 parents 88844b7 + 9f72bdb commit 09f6dba

21 files changed

+3756
-124
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.idea/workspace.xml

+42-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api.yaml

+115-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ paths:
2727
200:
2828
description: OK
2929
content:
30-
'*/*':
30+
'application/json':
3131
schema:
3232
type: object
3333
properties:
@@ -68,7 +68,7 @@ paths:
6868
type: string
6969
requestBody:
7070
content:
71-
'*/*':
71+
'application/json':
7272
schema:
7373
required:
7474
- email
@@ -105,7 +105,7 @@ paths:
105105
200:
106106
description: OK
107107
content:
108-
'*/*':
108+
'application/json':
109109
schema:
110110
type: object
111111
properties:
@@ -174,12 +174,120 @@ paths:
174174
200:
175175
description: OK
176176
content:
177-
'*/*':
177+
'application/json':
178+
schema:
179+
type: object
180+
properties:
181+
message:
182+
type: string
183+
403:
184+
description: Unauthorized
185+
content: { }
186+
x-codegen-request-body-name: body
187+
/lists/{list_id}/subscribers/{subscriber_id}/tags:
188+
get:
189+
tags:
190+
- Subscriber
191+
summary: Get the tags on a list subscriber.
192+
parameters:
193+
- name: list_id
194+
in: path
195+
required: true
196+
schema:
197+
type: string
198+
description: The unique ID for the list.
199+
200+
- name: subscriber_id
201+
in: path
202+
required: true
203+
schema:
204+
type: string
205+
description: The MD5 hash of the lowercase version of the list subscriber's email address.
206+
207+
- name: X-API-KEY
208+
in: header
209+
required: true
210+
schema:
211+
type: string
212+
213+
responses:
214+
200:
215+
description: OK
216+
content:
217+
'application/json':
218+
schema:
219+
type: object
220+
properties:
221+
data:
222+
type: array
223+
items:
224+
type: object
225+
properties:
226+
id:
227+
type: string
228+
name:
229+
type: string
230+
231+
403:
232+
description: Unauthorized
233+
content: { }
234+
x-codegen-request-body-name: body
235+
post:
236+
tags:
237+
- Subscriber
238+
summary: Add or remove tags from a list subscriber. If a tag that does not exist is passed in and set 'use_id = false', a new tag will be created.
239+
parameters:
240+
- name: list_id
241+
in: path
242+
required: true
243+
schema:
244+
type: string
245+
description: The unique ID for the list.
246+
247+
- name: subscriber_id
248+
in: path
249+
required: true
250+
schema:
251+
type: string
252+
description: The MD5 hash of the lowercase version of the list subscriber's email address.
253+
254+
- name: X-API-KEY
255+
in: header
256+
required: true
257+
schema:
258+
type: string
259+
260+
requestBody:
261+
content:
262+
'application/json':
263+
schema:
264+
required:
265+
- tags
266+
type: object
267+
properties:
268+
tags:
269+
type: array
270+
items:
271+
type: string
272+
description: Tag UUID or name
273+
use_id:
274+
type: boolean
275+
default: true
276+
is_sync:
277+
type: boolean
278+
default: false
279+
required: true
280+
responses:
281+
200:
282+
description: OK
283+
content:
284+
'application/json':
178285
schema:
179286
type: object
180287
properties:
181288
message:
182289
type: string
290+
183291
403:
184292
description: Unauthorized
185293
content: { }
@@ -233,7 +341,7 @@ paths:
233341
requestBody:
234342
description: Create a tag object
235343
content:
236-
'*/*':
344+
'application/json':
237345
schema:
238346
required:
239347
- name
@@ -277,7 +385,7 @@ paths:
277385
requestBody:
278386
description: Update a tag object
279387
content:
280-
'*/*':
388+
'application/json':
281389
schema:
282390
required:
283391
- name
@@ -319,6 +427,6 @@ paths:
319427
200:
320428
description: OK
321429
content:
322-
'*/*':
430+
'application/json':
323431
schema:
324432
type: object
File renamed without changes.
File renamed without changes.

favicon-16x16.png

-665 Bytes
Binary file not shown.

favicon-32x32.png

-628 Bytes
Binary file not shown.

index.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<title>weMail Client API</title>
7-
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
7+
<link rel="stylesheet" type="text/css" href="./css/swagger-ui.css" >
88
<link rel="icon" href="https://getwemail.io/app/uploads/2020/06/cropped-wemail-512-32x32.png" sizes="32x32" />
99
<link rel="icon" href="https://getwemail.io/app/uploads/2020/06/cropped-wemail-512-192x192.png" sizes="192x192" />
1010
<link rel="apple-touch-icon" href="https://getwemail.io/app/uploads/2020/06/cropped-wemail-512-180x180.png" />
@@ -34,8 +34,8 @@
3434
<body>
3535
<div id="swagger-ui"></div>
3636

37-
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
38-
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
37+
<script src="./js/swagger-ui-bundle.js" charset="UTF-8"> </script>
38+
<script src="./js/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
3939
<script>
4040
window.onload = function() {
4141
// Begin Swagger UI call region
@@ -57,5 +57,6 @@
5757
window.ui = ui
5858
}
5959
</script>
60+
<!--SCRIPT-->
6061
</body>
6162
</html>

index.php

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
$content = file_get_contents('index.html');
4+
5+
$browserSyncScript = '
6+
<script id="__bs_script__">//<![CDATA[
7+
document.write("<script async src=\'http://HOST:3000/browser-sync/browser-sync-client.js?v=2.27.7\'><\/script>".replace("HOST", location.hostname));
8+
//]]></script>';
9+
10+
echo str_replace('<!--SCRIPT-->', $browserSyncScript, $content);
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)