Created
December 13, 2018 14:15
-
-
Save JonCooperWorks/efe3fbb1dc861f7a3f0f50429548415c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"name": "Alphavantage", | |
"_postman_id": "5866f354-6cbe-1abb-918c-d56c5d15810c", | |
"description": "", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "Alphavantage Collection", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"id": "8de0ae0c-96e0-4697-a04a-28b6735afd03", | |
"type": "text/javascript", | |
"exec": [ | |
"const stockQuotesSchema = JSON.parse(pm.environment.get(\"stockQuotesSchema\"));", | |
"", | |
"pm.test(\"Stock quote returns 200 OK\", function () {", | |
" pm.response.to.have.status(200);", | |
"});", | |
"", | |
"pm.test(\"Stock quote is JSON\", function () {", | |
" pm.response.to.be.json;", | |
"});", | |
"", | |
"pm.test(\"Stock quote response matches schema\", function () {", | |
" const validationResult = tv4.validateResult(pm.response.json(), stockQuotesSchema);", | |
" pm.expect(validationResult.valid).to.be.true;", | |
"});" | |
] | |
} | |
} | |
], | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": {}, | |
"url": { | |
"raw": "https://www.alphavantage.co/query?function=BATCH_STOCK_QUOTES&symbols=MU&apikey=demoApiKey", | |
"protocol": "https", | |
"host": [ | |
"www", | |
"alphavantage", | |
"co" | |
], | |
"path": [ | |
"query" | |
], | |
"query": [ | |
{ | |
"key": "function", | |
"value": "BATCH_STOCK_QUOTES", | |
"equals": true | |
}, | |
{ | |
"key": "symbols", | |
"value": "MU", | |
"equals": true | |
}, | |
{ | |
"key": "apikey", | |
"value": "demoApiKey", | |
"equals": true | |
} | |
] | |
}, | |
"description": "" | |
}, | |
"response": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment