Skip to content
Snippets Groups Projects
Commit 44df72dd authored by insert's avatar insert
Browse files

Stay within api limits

parent 08eacbe8
No related merge requests found
......@@ -114,11 +114,12 @@ const request = {
source.matches.forEach(res => {
search.push(res.id);
});
fetch('https://api.tfl.gov.uk/StopPoint/' + search.join(','))
fetch('https://api.tfl.gov.uk/StopPoint/' + search.splice(0, 20).join(','))
.then(response => response.json())
.then(source => {
let data = [];
let process = (x, name) => {
console.log(x.stopType);
if (['NaptanOnstreetBusCoachStopCluster', 'NaptanOnstreetBusCoachStopPair'].indexOf(x.stopType) > -1) {
x.children.forEach(y => process(y));
} else if (x.stopType == 'NaptanPublicBusCoachTram') {
......
{
"expo": {
"name": "bustimes",
"description": "This project is really great.",
"description": "Bus Times",
"slug": "bustimes",
"privacy": "public",
"sdkVersion": "31.0.0",
"platforms": ["ios", "android"],
"version": "1.0.0",
"version": "1.0.1",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
......@@ -22,6 +22,9 @@
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "uk.insrt.android.bustimes"
}
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment