{"info":{"_postman_id":"d873c90f-efab-4183-bc9d-570a2efc76f7","name":"DTN Astronomical API v2","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json","_exporter_id":"310283"},"item":[{"name":"Authorization","item":[{"name":"Generate Authorization Token","event":[{"listen":"prerequest","script":{"exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"exec":["var jsonData = JSON.parse(responseBody);","","pm.environment.set('token', jsonData.data.access_token);"],"type":"text/javascript"}}],"protocolProfileBehavior":{"disabledSystemHeaders":{"accept":true,"content-type":true}},"request":{"auth":{"type":"noauth"},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\"grant_type\": \"client_credentials\",\n\"client_id\": \"{{client_id}}\",\n\"client_secret\": \"{{client_secret}}\",\n\"audience\": \"https://astronomical.api.dtn.com\"\n}"},"url":{"raw":"https://api.auth.dtn.com/v1/tokens/authorize","protocol":"https","host":["api","auth","dtn","com"],"path":["v1","tokens","authorize"]}},"response":[]}]},{"name":"Sun-Moon","item":[{"name":"Today in New York","event":[{"listen":"prerequest","script":{"exec":[""],"type":"text/javascript"}}],"protocolProfileBehavior":{"disabledSystemHeaders":{"connection":true,"accept-encoding":true}},"request":{"method":"GET","header":[{"key":"Accept-Encoding","value":"gzip","type":"text"}],"url":{"raw":"{{api_url}}/v2/sun-moon?lat=40.534939106638774&lon=-73.88505777716601","host":["{{api_url}}"],"path":["v2","sun-moon"],"query":[{"key":"lat","value":"40.534939106638774"},{"key":"lon","value":"-73.88505777716601"}]},"description":"Gets astronomical data for the current date at a location in New York."},"response":[]},{"name":"London in 3 days","protocolProfileBehavior":{"disabledSystemHeaders":{"connection":true,"accept-encoding":true}},"request":{"method":"GET","header":[{"key":"Accept-Encoding","value":"gzip","type":"text"}],"url":{"raw":"{{api_url}}/v2/sun-moon?lat=51.48090254643877&lon=-0.15717363357526715&startDate={{3DaysFromNow}}","host":["{{api_url}}"],"path":["v2","sun-moon"],"query":[{"key":"lat","value":"51.48090254643877"},{"key":"lon","value":"-0.15717363357526715"},{"key":"startDate","value":"{{3DaysFromNow}}"}]},"description":"Gets astronomical data for a date three days in the future at a location in London."},"response":[]},{"name":"Amsterdam with a date range","protocolProfileBehavior":{"disabledSystemHeaders":{"connection":true,"accept-encoding":true}},"request":{"method":"GET","header":[{"key":"Accept-Encoding","value":"gzip","type":"text"}],"url":{"raw":"{{api_url}}/v2/sun-moon?lat=52.369298973574985&lon=4.874941498041485&startDate={{3DaysBeforeNow}}&endDate={{3DaysFromNow}}","host":["{{api_url}}"],"path":["v2","sun-moon"],"query":[{"key":"lat","value":"52.369298973574985"},{"key":"lon","value":"4.874941498041485"},{"key":"startDate","value":"{{3DaysBeforeNow}}"},{"key":"endDate","value":"{{3DaysFromNow}}"}]},"description":"Gets astronomical data for a date range from three days in the past to three days in the future at a location in Amsterdam."},"response":[]}]}],"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["var moment = require('moment');","","pm.environment.set('3DaysFromNow',moment().add(3, 'days').format((\"YYYY-MM-DD\")))","pm.environment.set('3DaysBeforeNow',moment().subtract(3, 'days').format((\"YYYY-MM-DD\")))"]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"variable":[{"key":"api_url","value":"","type":"string"}]}