-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed.hurl
41 lines (38 loc) · 966 Bytes
/
feed.hurl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# /feed POST -----------------
POST {{BASE_URL}}/feed
Content-Type: application/json
Authorization: Bearer {{API_KEY}}
{
"url": "https://managingeditor.substack.com",
"useFirstImage": true,
"autoHashtag": true,
"type": "rss"
}
HTTP 200
[Captures]
id: jsonpath "$.id"
[Asserts]
header "Content-Type" == "application/json; charset=utf-8"
jsonpath "$.status" == "success"
jsonpath "$.id" exists
jsonpath "$.title" exists
jsonpath "$.websiteLink" == "https://managingeditor.substack.com"
jsonpath "$.feedURL" exists
jsonpath "$.autoHashtag" == true
jsonpath "$.useFirstImage" == true
# -----------------------
# /feed DELETE -----------------
DELETE {{BASE_URL}}/feed
Content-Type: application/json
Authorization: Bearer {{API_KEY}}
{
"id": "{{id}}"
}
HTTP 200
[Captures]
id: jsonpath "$.id"
[Asserts]
header "Content-Type" == "application/json; charset=utf-8"
jsonpath "$.status" == "success"
jsonpath "$.id" == "{{id}}"
# -----------------------