codeforboston / MBTA-API-API

An API for your MBTA bus API
MIT License
10 stars 3 forks source link

API out of date? #2

Open srl295 opened 1 year ago

srl295 commented 1 year ago
charlie = require('mbta').list(); // Rejects

stack trace:

Error: Unexpected close tag
Line: 0
Column: 361
Char: >
    at error (/Users/srl295/src/tmp/charlie/node_modules/sax/lib/sax.js:642:8)
    at strictFail (/Users/srl295/src/tmp/charlie/node_modules/sax/lib/sax.js:662:22)
    at closeTag (/Users/srl295/src/tmp/charlie/node_modules/sax/lib/sax.js:845:7)
    at SAXParser.write (/Users/srl295/src/tmp/charlie/node_modules/sax/lib/sax.js:1293:29)
    at Parser.exports.Parser.Parser.parseString (/Users/srl295/src/tmp/charlie/node_modules/xml2js/lib/xml2js.js:273:29)
    at /Users/srl295/src/tmp/charlie/node_modules/xml2js/lib/xml2js.js:6:61
    at Request._callback (/Users/srl295/src/tmp/charlie/node_modules/rta/index.js:145:5)
    at Request.self.callback (/Users/srl295/src/tmp/charlie/node_modules/request/index.js:148:22)
    at Request.emit (events.js:400:28)
    at Request.<anonymous> (/Users/srl295/src/tmp/charlie/node_modules/request/index.js:891:14)

May need to use new API @ https://www.mbta.com/developers/v3-api

srl295 commented 1 year ago

Looks like the underlying XML is just gone.

srl295 commented 1 year ago

https://github.com/helloitsjoe/mbta-client seems to be an updated client that uses the v3 API

calvinmetcalf commented 1 year ago

I'm going to be honest I have not touched this in a decade, if you'd like to take over this library I'm happy to transfer it to you

srl295 commented 1 year ago

Didn't mean that as a yes but an 'understood'… Let me see if I can actually contribute something first