Skip to content

Commit 20d15f4

Browse files
committed
Added Postman API function test collection
1 parent bc863c9 commit 20d15f4

File tree

2 files changed

+263
-0
lines changed

2 files changed

+263
-0
lines changed

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
*** WooCommerce API Manager PHP Library for Plugins and Themes Changelog ***
22

3+
2019.08.21 - version 2.7
4+
* https://www.getpostman.com/postman collection template file added. The preconfigured .json file can be imported into Postman to make it easy to test the API functions. Server URL, and keys/values will need to be modifed specific to your product and server.
5+
36
2019.08.07 - version 2.7
47
* New: Major update for API Manager version 2.1 and greater.
58

Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
{
2+
"info": {
3+
"_postman_id": "15a2f398-c8a1-4fb9-9eae-4fbd2dc7bab7",
4+
"name": "WC >= 2.0",
5+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6+
},
7+
"item": [
8+
{
9+
"name": "activation 2.0",
10+
"request": {
11+
"method": "POST",
12+
"header": [],
13+
"url": {
14+
"raw": "http://wc/?wc-api=wc-am-api&wc_am_action=activate&instance=p1uOusaNM5ub3&object=http://dev.toddlahman.com/&product_id=137890&version=1.0&api_key=9f9273c809979608220752449d55fec9fbe85c3e",
15+
"protocol": "http",
16+
"host": [
17+
"wc"
18+
],
19+
"path": [
20+
""
21+
],
22+
"query": [
23+
{
24+
"key": "wc-api",
25+
"value": "wc-am-api"
26+
},
27+
{
28+
"key": "wc_am_action",
29+
"value": "activate"
30+
},
31+
{
32+
"key": "instance",
33+
"value": "p1uOusaNM5ub3"
34+
},
35+
{
36+
"key": "object",
37+
"value": "http://dev.toddlahman.com/"
38+
},
39+
{
40+
"key": "product_id",
41+
"value": "137890"
42+
},
43+
{
44+
"key": "version",
45+
"value": "1.0"
46+
},
47+
{
48+
"key": "api_key",
49+
"value": "9f9273c809979608220752449d55fec9fbe85c3e"
50+
}
51+
]
52+
}
53+
},
54+
"response": []
55+
},
56+
{
57+
"name": "deactivation 2.0",
58+
"request": {
59+
"method": "POST",
60+
"header": [],
61+
"url": {
62+
"raw": "http://wc/?wc-api=wc-am-api&wc_am_action=deactivate&instance=p1uOusaNM5ub3&product_id=137890&api_key=9f9273c809979608220752449d55fec9fbe85c3e",
63+
"protocol": "http",
64+
"host": [
65+
"wc"
66+
],
67+
"path": [
68+
""
69+
],
70+
"query": [
71+
{
72+
"key": "wc-api",
73+
"value": "wc-am-api"
74+
},
75+
{
76+
"key": "wc_am_action",
77+
"value": "deactivate"
78+
},
79+
{
80+
"key": "instance",
81+
"value": "p1uOusaNM5ub3"
82+
},
83+
{
84+
"key": "product_id",
85+
"value": "137890"
86+
},
87+
{
88+
"key": "api_key",
89+
"value": "9f9273c809979608220752449d55fec9fbe85c3e"
90+
}
91+
]
92+
}
93+
},
94+
"response": []
95+
},
96+
{
97+
"name": "status 2.0",
98+
"request": {
99+
"method": "POST",
100+
"header": [],
101+
"url": {
102+
"raw": "http://wc/?wc-api=wc-am-api&wc_am_action=status&instance=p1uOusaNM5ub3&product_id=137890&api_key=9f9273c809979608220752449d55fec9fbe85c3e",
103+
"protocol": "http",
104+
"host": [
105+
"wc"
106+
],
107+
"path": [
108+
""
109+
],
110+
"query": [
111+
{
112+
"key": "wc-api",
113+
"value": "wc-am-api"
114+
},
115+
{
116+
"key": "wc_am_action",
117+
"value": "status"
118+
},
119+
{
120+
"key": "instance",
121+
"value": "p1uOusaNM5ub3"
122+
},
123+
{
124+
"key": "product_id",
125+
"value": "137890"
126+
},
127+
{
128+
"key": "api_key",
129+
"value": "9f9273c809979608220752449d55fec9fbe85c3e"
130+
}
131+
]
132+
}
133+
},
134+
"response": []
135+
},
136+
{
137+
"name": "information 2.0",
138+
"request": {
139+
"method": "POST",
140+
"header": [],
141+
"url": {
142+
"raw": "http://wc/?wc-api=wc-am-api&wc_am_action=information&instance=p1uOusaNM5ub3&product_id=137890&version=1.0&api_key=9f9273c809979608220752449d55fec9fbe85c3e&plugin_name=simple-comments/simple-comments.php",
143+
"protocol": "http",
144+
"host": [
145+
"wc"
146+
],
147+
"path": [
148+
""
149+
],
150+
"query": [
151+
{
152+
"key": "wc-api",
153+
"value": "wc-am-api"
154+
},
155+
{
156+
"key": "wc_am_action",
157+
"value": "information"
158+
},
159+
{
160+
"key": "instance",
161+
"value": "p1uOusaNM5ub3"
162+
},
163+
{
164+
"key": "product_id",
165+
"value": "137890"
166+
},
167+
{
168+
"key": "version",
169+
"value": "1.0"
170+
},
171+
{
172+
"key": "api_key",
173+
"value": "9f9273c809979608220752449d55fec9fbe85c3e"
174+
},
175+
{
176+
"key": "plugin_name",
177+
"value": "simple-comments/simple-comments.php"
178+
}
179+
]
180+
}
181+
},
182+
"response": []
183+
},
184+
{
185+
"name": "update 2.0",
186+
"request": {
187+
"method": "POST",
188+
"header": [],
189+
"url": {
190+
"raw": "http://wc/?wc-api=wc-am-api&wc_am_action=update&instance=p1uOusaNM5ub3&product_id=137890&version=1.0&api_key=9f9273c809979608220752449d55fec9fbe85c3e&plugin_name=simple-comments",
191+
"protocol": "http",
192+
"host": [
193+
"wc"
194+
],
195+
"path": [
196+
""
197+
],
198+
"query": [
199+
{
200+
"key": "wc-api",
201+
"value": "wc-am-api"
202+
},
203+
{
204+
"key": "wc_am_action",
205+
"value": "update"
206+
},
207+
{
208+
"key": "instance",
209+
"value": "p1uOusaNM5ub3"
210+
},
211+
{
212+
"key": "product_id",
213+
"value": "137890"
214+
},
215+
{
216+
"key": "version",
217+
"value": "1.0"
218+
},
219+
{
220+
"key": "api_key",
221+
"value": "9f9273c809979608220752449d55fec9fbe85c3e"
222+
},
223+
{
224+
"key": "plugin_name",
225+
"value": "simple-comments"
226+
},
227+
{
228+
"key": "slug",
229+
"value": "api-manager-php-library",
230+
"disabled": true
231+
}
232+
]
233+
}
234+
},
235+
"response": []
236+
}
237+
],
238+
"event": [
239+
{
240+
"listen": "prerequest",
241+
"script": {
242+
"id": "abf60ea2-7527-488c-a97a-3f4eeb8b9fd7",
243+
"type": "text/javascript",
244+
"exec": [
245+
""
246+
]
247+
}
248+
},
249+
{
250+
"listen": "test",
251+
"script": {
252+
"id": "37707542-3069-4c8a-8d71-26882d5b1616",
253+
"type": "text/javascript",
254+
"exec": [
255+
""
256+
]
257+
}
258+
}
259+
]
260+
}

0 commit comments

Comments
 (0)