Built-in functions of the Dart package
BubiUser(phoneNumber, pin) (phoneNumber, and pin needs to be a string)
info()(async) - returns user information in JSON (not map) format -> if you want it in map format,import json, and usejson.decode(info())getScreenName()(async) - grabs the screen name frominfo(), and returns itgetLoginKey()(async) - grabs the login key frominfo(), and returns itcallOtherEndpoint(relativeURL, data)(async) - (relativeURL needs to be a string, and data needs to be a map) calls the specifiedendpointwith the specifieddata(plusloginkey,domain,apikey,show_errors), and returns the output. (you can find endpoints here)rentBike(bikeNumber)(async) - (bikeNumber needs to be an integer) rents a bike, and returns the outputgetRentals()(async) - returns information about the user's rentalsgetClosedRentals()(async) - returns closed rentals fromgetRentals()getActiveRentals()(async) - returns active rentalsgetPaymentLinks()(async) - returns information about payment linksgetSubscriptionInfo()(async) - returns the end of the subscription, and the type of the subscriptiongetSubScriptionType()(async) - returns the type of the subscription based ongetSubscriptionInfo()(monthly, or annual)getEndOfSubscription()(async) - returns the end of the subscription based ongetSubscriptionInfo()(date)moreInfo()(async) - returns a LOT of information about the usergetRentalDetails()(async) - returns information about the current rental
BubiMap()
listAllStations()(async) - returns a JSON object containing all stationslistAllBikes()(async) - returns a JSON object containing all bikeslistAllBikesFormatted()(async) - returns a JSON object containing all bikes (without the unnecessary parts)listAllStationsFormatted()(async) - returns a JSON object containing all stations (without the unnecessary parts)getNearestStations(lat, lon)(async) - (lat, and lon needs to be a float) returns a JSON object containing all stations, sorted by proximity tolat, andlon. Distance is counted in geographical degrees. (calculated using the Pythagorean theorem)getNearestStation(lat, lon)(async) - (lat, and lon needs to be a float) returns the nearest station's name by latitude, and longitude (based on the first key ofgetNearestStations)getNearestStationByAddress(address)(async) - returns the nearest station's name by address (usinggetNearestStation(), and OpenStreetMap API)listAllBikesOnStations(stationName)(async) - returns all the bikes on a station (and the number of these bikes, and information about these bikes)countBikesOnStation(stationName)(async) - counts all the bikes on a station (usinglistAllBikesOnStation()), and returns the countergetCoordinatesOfStation(stationName)(async) - returns the coordinates of a station (latitude, longitude)
BubiHelpers()
register()- Work in progress...pinReset(mobile)- Work in progress...getNews()(async) - Returns all the news in a JSON formatgetNewsFormatted()(async) - Returns all the news from the mobile app without the unnecessary parts (based ongetNews())readNew(uid)(async) - Returns the HTML page of a specific new article with the given uid (based ongetNewsFormatted()) (uid needs to be an integer)