This file contains hidden or 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
| // Usage: | |
| // 1. Request API access here: https://www.mass.gov/service-details/highway-data-for-developers | |
| // 2. When your account details arrive create 3 environment vars | |
| // MASSDOT_USERNAME | |
| // MASSDOT_PASSWORD | |
| // MASSDOT_SECRET_KEY | |
| // 3. ts-node massdot.ts | |
| import dotenv from "dotenv"; |
This file contains hidden or 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
| import os | |
| import filesystem | |
| def ... |
This file contains hidden or 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
| import os |
This file contains hidden or 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
| PropertySpec ps = new PropertySpec(); | |
| ps.setAll(true); | |
| ps.setType("AuthorizationManager"); | |
| PropertyFilterSpec pfs = new PropertyFilterSpec(); | |
| pfs.getPropSet().add(ps); | |
| ObjectSpec objSpec = new ObjectSpec(); | |
| objSpec.setObj(serviceContent.getAuthorizationManager()); | |
| pfs.getObjectSet().add(objSpec); | |
| pfs.setReportMissingObjectsInResults(Boolean.TRUE); | |
| RetrieveOptions retOp = new RetrieveOptions(); |
This file contains hidden or 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
| { | |
| "results": [ | |
| { | |
| "birth_week": "2014-09-08", | |
| "users": 1, | |
| "week": "2014-12-29" | |
| }, | |
| { | |
| "birth_week": "2014-09-29", | |
| "users": 1640, |