nearby: support opt.products

This commit is contained in:
Jannis R 2020-11-15 13:40:37 +01:00
parent 47dfddfeb4
commit 6d4f29a3f9
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
16 changed files with 283 additions and 0 deletions

View file

@ -15,6 +15,9 @@ const nearbyReq = (ctx, location) => {
maxDist: opt.distance || -1,
minDist: 0
},
locFltrL: [
profile.formatProductsFilter(ctx, opt.products || {}),
],
getPOIs: !!opt.poi,
getStops: !!opt.stops,
maxLoc: opt.results

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,35 @@
{
"statusCode": 200,
"headers": {
"date": "Sun, 15 Nov 2020 13:14:41 GMT",
"server": "Apache",
"content-length": "1965",
"connection": "close",
"content-type": "application/json; charset=utf-8"
},
"url": "https://nah.sh.hafas.de/bin/mgate.exe",
"time": 441,
"request": {
"method": "POST",
"headers": {
"Content-Type": [
"application/json"
],
"Accept-Encoding": [
"gzip, br, deflate"
],
"Accept": [
"application/json"
],
"user-agent": [
"public-tr440796744d9dansport/hafas-client:test"
],
"Content-Length": [
"352"
],
"Connection": [
"close"
]
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,35 @@
{
"statusCode": 200,
"headers": {
"date": "Sun, 15 Nov 2020 13:15:23 GMT",
"server": "Apache",
"content-length": "1252",
"connection": "close",
"content-type": "application/json; charset=utf-8"
},
"url": "https://fpa.invg.de/bin/mgate.exe?mic=9ade653dc00ec0b08f4a5f8f3acc004c&mac=01fb9607a2210c4587dbe1291a6ea6f1",
"time": 425,
"request": {
"method": "POST",
"headers": {
"Content-Type": [
"application/json"
],
"Accept-Encoding": [
"gzip, br, deflate"
],
"Accept": [
"application/json"
],
"user-agent": [
"public-transport/8bc582aaeebehafas-client:test"
],
"Content-Length": [
"388"
],
"Connection": [
"close"
]
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,36 @@
{
"statusCode": 200,
"headers": {
"date": "Sun, 15 Nov 2020 13:14:45 GMT",
"server": "Apache",
"content-length": "1201",
"keep-alive": "timeout=5",
"connection": "Keep-Alive",
"content-type": "application/json; charset=utf-8"
},
"url": "http://fahrplan.oebb.at/bin/mgate.exe",
"time": 302,
"request": {
"method": "POST",
"headers": {
"Content-Type": [
"application/json"
],
"Accept-Encoding": [
"gzip, br, deflate"
],
"Accept": [
"application/json"
],
"user-agent": [
"public-transport/hafas-cli6641b7438469ent:test"
],
"Content-Length": [
"387"
],
"Connection": [
"close"
]
}
}
}

View file

@ -0,0 +1 @@
{"ver":"1.15","ext":"DB.R19.04.a","lang":"eng","id":"mgg8atb4m4xuh488","cInfo":{"code":"OK","url":"","msg":""},"svcResL":[{"meth":"LocGeoPos","err":"OK","res":{"common":{"locL":[{"lid":"A=1@O=Berlin Jungfernheide@X=13299433@Y=52530273@U=80@L=8011167@","type":"S","name":"Berlin Jungfernheide","icoX":0,"extId":"8011167","state":"F","crd":{"x":13299451,"y":52530291,"z":0,"type":"WGS84","layerX":0,"crdSysX":0},"pCls":184,"pRefL":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]}],"prodL":[{"name":"Bus RE6","nameS":"RE6","icoX":0,"cls":8,"prodCtx":{"name":"Bus RE6","line":"RE6","lineId":"3_BB_____RE6","matchId":"","catOut":"Bus ","catOutS":"Bsv","catOutL":"SEV-Bus"}},{"name":"Bus SEV","nameS":"SEV","icoX":0,"cls":8,"prodCtx":{"name":"Bus SEV","line":"SEV","lineId":"3_080001_SEV!!1498386!!5840667","matchId":"","catOut":"Bus ","catOutS":"Bsv","catOutL":"SEV-Bus"}},{"name":"RB","icoX":1,"cls":8,"prodCtx":{"name":"RB ","line":"","matchId":"","catOut":"RB ","catOutS":"RB","catOutL":"Regionalbahn"}},{"name":"RE","icoX":2,"cls":8,"prodCtx":{"name":"RE ","line":"","matchId":"","catOut":"DPN ","catOutS":"DPN","catOutL":"Nahreisezug"}},{"name":"RE","icoX":3,"cls":8,"prodCtx":{"name":"RE ","line":"","matchId":"","catOut":"RE ","catOutS":"RE","catOutL":"Regional-Express"}},{"name":"S 2","nameS":"2","icoX":4,"cls":16,"prodCtx":{"name":"S 2","line":"2","lineId":"4_08_____2","matchId":"","catOut":"S ","catOutS":"s","catOutL":"S-Bahn"}},{"name":"S 25","nameS":"25","icoX":4,"cls":16,"prodCtx":{"name":"S 25","line":"25","lineId":"4_08_____25","matchId":"","catOut":"S ","catOutS":"s","catOutL":"S-Bahn"}},{"name":"S 41","nameS":"41","icoX":4,"cls":16,"prodCtx":{"name":"S 41","line":"41","lineId":"4_08_____41","matchId":"","catOut":"S ","catOutS":"s","catOutL":"S-Bahn"}},{"name":"S 42","nameS":"42","icoX":4,"cls":16,"prodCtx":{"name":"S 42","line":"42","lineId":"4_08_____42","matchId":"","catOut":"S ","catOutS":"s","catOutL":"S-Bahn"}},{"name":"S 46","nameS":"46","icoX":4,"cls":16,"prodCtx":{"name":"S 46","line":"46","lineId":"4_08_____46","matchId":"","catOut":"S ","catOutS":"s","catOutL":"S-Bahn"}},{"name":"Bus N7","nameS":"N7","icoX":0,"cls":32,"prodCtx":{"name":"Bus N7","line":"N7","lineId":"5_vbbBVB_N7","matchId":"","catOut":"Bus ","catOutS":"Bus","catOutL":"Bus"}},{"name":"Bus X9","nameS":"X9","icoX":0,"cls":32,"prodCtx":{"name":"Bus X9","line":"X9","lineId":"5_vbbBVB_X9","matchId":"","catOut":"Bus ","catOutS":"Bus","catOutL":"Bus"}},{"name":"Bus 109","nameS":"109","icoX":0,"cls":32,"prodCtx":{"name":"Bus 109","line":"109","lineId":"5_vbbBVB_109","matchId":"","catOut":"Bus ","catOutS":"Bus","catOutL":"Bus"}},{"name":"Bus M21","nameS":"M21","icoX":0,"cls":32,"prodCtx":{"name":"Bus M21","line":"M21","lineId":"5_vbbBVB_M21","matchId":"","catOut":"Bus ","catOutS":"Bus","catOutL":"Bus"}},{"name":"Bus M27","nameS":"M27","icoX":0,"cls":32,"prodCtx":{"name":"Bus M27","line":"M27","lineId":"5_vbbBVB_M27","matchId":"","catOut":"Bus ","catOutS":"Bus","catOutL":"Bus"}},{"name":"U 7","nameS":"7","icoX":5,"cls":128,"prodCtx":{"name":"U 7","line":"7","lineId":"7_vbbBVU_7","matchId":"","catOut":"U ","catOutS":"U","catOutL":"U-Bahn"}}],"polyL":[],"layerL":[{"id":"standard","name":"standard","index":0,"annoCnt":0}],"crdSysL":[{"id":"standard","index":0,"type":"WGS84","dim":3}],"opL":[],"remL":[],"icoL":[{"res":"Bus"},{"res":"RB"},{"res":"DPN"},{"res":"RE"},{"res":"S"},{"res":"U"}]},"locL":[{"lid":"A=1@O=Berlin Jungfernheide@X=13299433@Y=52530273@u=0@U=80@L=8011167@","type":"S","name":"Berlin Jungfernheide","icoX":0,"extId":"8011167","state":"F","crd":{"x":13299451,"y":52530291,"z":0,"type":"WGS84","layerX":0,"crdSysX":0},"pCls":184,"pRefL":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],"wt":8672,"dist":0,"dur":0},{"lid":"A=1@O=Berlin Jungfernheide (S)@X=13299442@Y=52530372@u=0@U=80@L=8089100@","type":"S","name":"Berlin Jungfernheide (S)","icoX":2,"extId":"8089100","state":"F","crd":{"x":13299424,"y":52530408,"z":0,"type":"WGS84","layerX":0,"crdSysX":0},"pCls":184,"pRefL":[3,5,6,7,8,9],"wt":8672,"dist":11,"dur":133,"entry":true,"mMastLocX":0}]}}]}

View file

@ -0,0 +1,35 @@
{
"statusCode": 200,
"headers": {
"content-type": "application/json; charset=utf-8",
"date": "Sun, 15 Nov 2020 13:15:15 GMT",
"server": "Apache",
"content-length": "1011",
"connection": "Close"
},
"url": "https://reiseauskunft.bahn.de/bin/mgate.exe?checksum=8cdc457c15a92c0e3c700a35ef6d88b1",
"time": 1366,
"request": {
"method": "POST",
"headers": {
"Content-Type": [
"application/json"
],
"Accept-Encoding": [
"gzip, br, deflate"
],
"Accept": [
"application/json"
],
"user-agent": [
"public-transport/hafasc4dddb66a282-client:test"
],
"Content-Length": [
"417"
],
"Connection": [
"close"
]
}
}
}

View file

@ -0,0 +1 @@
{"ver":"1.16","ext":"VBB.1","lang":"eng","id":"n8k8xtvemw8rymww","svcResL":[{"meth":"LocGeoPos","err":"OK","res":{"common":{"locL":[],"prodL":[{"pid":"L::1::U::B3041857784::U_3041857784_U7::*","name":"U7","nameS":"U7","icoX":0,"cls":2,"prodCtx":{"name":"U7","line":"U7","lineId":"U7","matchId":"","catOut":"U ","catOutS":"U","catOutL":"U "},"himIdL":["HIM_FREETEXT_98307","HIM_FREETEXT_75748","HIM_FREETEXT_97849"]},{"pid":"L::1::U::B3041857784::U_3041857784_U9::*","name":"U9","nameS":"U9","icoX":0,"cls":2,"prodCtx":{"name":"U9","line":"U9","lineId":"U9","matchId":"","catOut":"U ","catOutS":"U","catOutL":"U "},"himIdL":["HIM_FREETEXT_75748","HIM_FREETEXT_100504"]},{"pid":"L::3::Bus::B3041857784::Bus_3041857784_104::*","name":"104","nameS":"104","icoX":1,"cls":8,"prodCtx":{"name":"104","line":"104","lineId":"104","matchId":"","catOut":"Bus ","catOutS":"B","catOutL":"Bus "},"himIdL":["HIM_FREETEXT_11876","HIM_FREETEXT_19702","HIM_FREETEXT_11878","HIM_FREETEXT_19703","HIM_FREETEXT_75748","HIM_FREETEXT_81700"]},{"pid":"L::3::Bus::B3041857784::Bus_3041857784_N7::*","name":"N7","nameS":"N7","icoX":1,"cls":8,"prodCtx":{"name":"N7","line":"N7","lineId":"N7","matchId":"","catOut":"Bus ","catOutS":"B","catOutL":"Bus "},"himIdL":["HIM_FREETEXT_75748","HIM_FREETEXT_81700"]},{"pid":"L::3::Bus::B3041857784::Bus_3041857784_N7X::*","name":"N7X","nameS":"N7X","icoX":1,"cls":8,"prodCtx":{"name":"N7X","line":"N7X","lineId":"N7X","matchId":"","catOut":"Bus ","catOutS":"B","catOutL":"Bus "},"himIdL":["HIM_FREETEXT_81700"]},{"pid":"L::3::Bus::B3041857784::Bus_3041857784_N9::*","name":"N9","nameS":"N9","icoX":1,"cls":8,"prodCtx":{"name":"N9","line":"N9","lineId":"N9","matchId":"","catOut":"Bus ","catOutS":"B","catOutL":"Bus "},"himIdL":["HIM_FREETEXT_81700"]},{"pid":"L::3::Bus::B3041857784::Bus_3041857784_N42::*","name":"N42","nameS":"N42","icoX":1,"cls":8,"prodCtx":{"name":"N42","line":"N42","lineId":"N42","matchId":"","catOut":"Bus ","catOutS":"B","catOutL":"Bus "},"himIdL":["HIM_FREETEXT_75748","HIM_FREETEXT_81700"]}],"polyL":[],"layerL":[{"id":"standard","name":"standard","index":0,"annoCnt":0}],"crdSysL":[{"id":"standard","index":0,"type":"WGS84","dim":2}],"opL":[],"remL":[],"icoL":[{"res":"prod_sub_t","fg":{"r":255,"g":255,"b":255,"a":255},"bg":{"r":0,"g":51,"b":153,"a":255}},{"res":"prod_bus_t","fg":{"r":255,"g":255,"b":255,"a":255},"bg":{"r":153,"g":51,"b":153,"a":255}},{"res":"haf_map_halt"}]},"locL":[{"lid":"A=1@O=U Berliner Str. (Berlin)@X=13331353@Y=52487044@u=0@U=86@L=900044201@","type":"S","name":"U Berliner Str. (Berlin)","icoX":2,"extId":"900044201","state":"F","crd":{"x":13331353,"y":52487044,"type":"WGS84","layerX":0,"crdSysX":0},"pCls":10,"pRefL":[0,1,2,3,4,5,6],"wt":13790,"dist":40,"dur":168},{"lid":"A=1@O=Landhausstr. (Berlin)@X=13328522@Y=52486846@u=0@U=86@L=900043252@","type":"S","name":"Landhausstr. (Berlin)","icoX":2,"extId":"900043252","state":"F","crd":{"x":13328522,"y":52486846,"type":"WGS84","layerX":0,"crdSysX":0},"pCls":8,"pRefL":[2,3,6],"wt":756,"dist":179,"dur":334}]}}]}

View file

@ -0,0 +1,36 @@
{
"statusCode": 200,
"headers": {
"date": "Sun, 15 Nov 2020 13:14:51 GMT",
"server": "Apache",
"vary": "User-Agent",
"content-length": "852",
"connection": "close",
"content-type": "application/json; charset=utf-8"
},
"url": "https://fahrinfo.vbb.de/bin/mgate.exe?mic=7330410668bb44680568eac52cb97687&mac=e66394dfa62a5861d41d30e1a16470e9",
"time": 724,
"request": {
"method": "POST",
"headers": {
"Content-Type": [
"application/json"
],
"Accept-Encoding": [
"gzip, br, deflate"
],
"Accept": [
"application/json"
],
"user-agent": [
"public-5a7c0c2d5b89transport/hafas-client:test"
],
"Content-Length": [
"385"
],
"Connection": [
"close"
]
}
}
}

View file

@ -0,0 +1 @@
{"ver":"1.21","ext":"BVG.1","lang":"eng","id":"gn28atdcm4xfy6cc","err":"OK","svcResL":[{"meth":"LocGeoPos","err":"OK","res":{"common":{"locL":[],"prodL":[{"name":"U7","nameS":"U7","icoX":0,"cls":2,"prodCtx":{"name":"U7","line":"U7","lineId":"U7","catOut":"U ","catOutS":"U","catOutL":"U "}},{"name":"U9","nameS":"U9","icoX":0,"cls":2,"prodCtx":{"name":"U9","line":"U9","lineId":"U9","catOut":"U ","catOutS":"U","catOutL":"U "}},{"name":"104","nameS":"104","icoX":1,"cls":8,"prodCtx":{"name":"104","line":"104","lineId":"104","catOut":"Bus ","catOutS":"B","catOutL":"Bus "}},{"name":"N42","nameS":"N42","icoX":1,"cls":8,"prodCtx":{"name":"N42","line":"N42","lineId":"N42","catOut":"Bus ","catOutS":"B","catOutL":"Bus "}},{"name":"N7","nameS":"N7","icoX":1,"cls":8,"prodCtx":{"name":"N7","line":"N7","lineId":"N7","catOut":"Bus ","catOutS":"B","catOutL":"Bus "}},{"name":"N7X","nameS":"N7X","icoX":1,"cls":8,"prodCtx":{"name":"N7X","line":"N7X","lineId":"N7X","catOut":"Bus ","catOutS":"B","catOutL":"Bus "}},{"name":"N9","nameS":"N9","icoX":1,"cls":8,"prodCtx":{"name":"N9","line":"N9","lineId":"N9","catOut":"Bus ","catOutS":"B","catOutL":"Bus "}}],"polyL":[],"layerL":[{"id":"standard","name":"standard","index":0,"annoCnt":0}],"crdSysL":[{"id":"standard","index":0,"type":"WGS84"}],"opL":[],"remL":[],"icoL":[{"res":"prod_sub_t","fg":{"r":255,"g":255,"b":255},"bg":{"r":0,"g":51,"b":153}},{"res":"prod_bus_t","fg":{"r":255,"g":255,"b":255},"bg":{"r":153,"g":51,"b":153}}]},"locL":[{"lid":"A=1@O=U Berliner Str. (Berlin)@X=13331353@Y=52487044@u=0@U=86@L=900044201@","type":"S","name":"U Berliner Str. (Berlin)","icoX":0,"extId":"900044201","state":"F","crd":{"x":13331353,"y":52487044,"layerX":0,"crdSysX":0},"pCls":10,"pRefL":[0,1,2,3,4,5,6],"wt":13790,"dist":40,"dur":168},{"lid":"A=1@O=Landhausstr. (Berlin)@X=13328522@Y=52486846@u=0@U=86@L=900043252@","type":"S","name":"Landhausstr. (Berlin)","icoX":1,"extId":"900043252","state":"F","crd":{"x":13328522,"y":52486846,"layerX":0,"crdSysX":0},"pCls":8,"pRefL":[2,3,4],"wt":756,"dist":179,"dur":334}]}}]}

View file

@ -0,0 +1,36 @@
{
"statusCode": 200,
"headers": {
"date": "Sun, 15 Nov 2020 13:17:26 GMT",
"server": "Apache",
"vary": "User-Agent",
"content-length": "679",
"connection": "close",
"content-type": "application/json; charset=utf-8"
},
"url": "https://bvg-apps.hafas.de/bin/mgate.exe",
"time": 392,
"request": {
"method": "POST",
"headers": {
"Content-Type": [
"application/json"
],
"Accept-Encoding": [
"gzip, br, deflate"
],
"Accept": [
"application/json"
],
"user-agent": [
"public-transport/hafas-cliena579bbd5c235t:test"
],
"Content-Length": [
"386"
],
"Connection": [
"close"
]
}
}
}

View file

@ -0,0 +1,25 @@
{
"url": "https://bvg-apps.hafas.de/bin/mgate.exe",
"method": "POST",
"headers": {
"Content-Type": [
"application/json"
],
"Accept-Encoding": [
"gzip, br, deflate"
],
"Accept": [
"application/json"
],
"user-agent": [
"public-transport/hafas-clf96918853695ient:test"
],
"Content-Length": [
"386"
],
"Connection": [
"close"
]
},
"body": "{\"lang\":\"en\",\"svcReqL\":[{\"cfg\":{\"polyEnc\":\"GPA\"},\"meth\":\"LocGeoPos\",\"req\":{\"ring\":{\"cCrd\":{\"x\":13331041,\"y\":52487345},\"maxDist\":200,\"minDist\":0},\"locFltrL\":[{\"type\":\"PROD\",\"mode\":\"INC\",\"value\":\"127\"}],\"getPOIs\":false,\"getStops\":true,\"maxLoc\":8}}],\"client\":{\"type\":\"IPA\",\"id\":\"BVG\",\"name\":\"FahrInfo\",\"v\":\"6020000\"},\"ext\":\"BVG.1\",\"ver\":\"1.21\",\"auth\":{\"type\":\"AID\",\"aid\":\"Mz0YdF9Fgx0Mb9\"}}"
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,35 @@
{
"statusCode": 200,
"headers": {
"date": "Sun, 15 Nov 2020 13:15:27 GMT",
"server": "Apache/2.4.18 (Ubuntu)",
"content-length": "2456",
"connection": "close",
"content-type": "application/json; charset=utf-8"
},
"url": "https://saarfahrplan.de/bin/mgate.exe?mic=48869fa0ac86299cf505d8b7e95f1995&mac=0fbe94cd306267d816cc97c6d1f4410c",
"time": 387,
"request": {
"method": "POST",
"headers": {
"Content-Type": [
"application/json"
],
"Accept-Encoding": [
"gzip, br, deflate"
],
"Accept": [
"application/json"
],
"user-agent": [
"public-transpof6c12efd0d51rt/hafas-client:test"
],
"Content-Length": [
"413"
],
"Connection": [
"close"
]
}
}
}