Skip to content

Commit fc12560

Browse files
committed
rest.exe: more methods as comments [wip]
1 parent 70b8b57 commit fc12560

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

rest-exe-example.js

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ const {
1313
locations, nearby,
1414
departures, arrivals,
1515
journeys, trip, tripAlternatives
16+
// tripHistory,
17+
// radar,
18+
// remarks, dataInfo
1619
} = createClient(profile, TOKEN, 'hafas-client example')
1720

1821
const berlinOstkreuz = '8011162'

rest-exe.js

+39
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,45 @@ const createRestClient = (profile, token, userAgent) => {
347347
return profile.parseTrip(ctx, ctx.res)
348348
}
349349

350+
// todo: fails with 404
351+
// const tripHistory = async (tripId) => {
352+
// const ctx = await request('rtarchive', opt, {
353+
// id: tripId,
354+
// date: profile.formatDate({profile, opt}, opt.when || Date.now())
355+
// })
356+
// return ctx.res
357+
// }
358+
359+
// todo: fails with 404
360+
// const radar = async (bbox) => {
361+
// const ctx = await request('journeyPos', opt, {
362+
// llLat: bbox.south,
363+
// llLon: bbox.west,
364+
// urLat: bbox.north,
365+
// urLon: bbox.east,
366+
// // todo: operators, products, attributes, lines, jid, infotexts
367+
// // todo: maxJny, time
368+
// date: profile.formatDate({profile, opt}, opt.when || Date.now())
369+
// })
370+
// return ctx.res
371+
// }
372+
373+
// todo: fails with 404
374+
// const remarks = async () => {
375+
// const ctx = await request('himSearch', opt, {
376+
// // todo: dateB, dateE, timeB, timeE, himIds, operators, categories
377+
// // todo: channels, companies, metas, himcategory, poly, searchmode
378+
// // todo: minprio, maxprio
379+
// })
380+
// return ctx.res
381+
// }
382+
383+
// todo: fails with 404
384+
// const dataInfo = async () => {
385+
// const ctx = await request('datainfo', opt)
386+
// return ctx.res
387+
// }
388+
350389
const client = {
351390
locations, nearby,
352391
departures, arrivals,

0 commit comments

Comments
 (0)