Skip to content

Commit

Permalink
find-unknown-fields: basic journeys() schema, VBB & DB queries
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed May 27, 2019
1 parent 8e7fa83 commit 4a88d05
Show file tree
Hide file tree
Showing 2 changed files with 1,508 additions and 1 deletion.
28 changes: 27 additions & 1 deletion find-unknown-fields/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,34 @@
const Ajv = require('ajv')
const omit = require('lodash/omit')
const createClient = require('..')
const vbbProfile = require('../p/vbb')
const dbProfile = require('../p/db')
const journeysSchema = require('./journeys.schema.json')
// todo: https://github.com/epoberezkin/ajv#formats
// todo: https://github.com/epoberezkin/ajv#combining-schemas-with-ref

const tasks = []
const tasks = [
[
vbbProfile,
// Risaer Str. to TXL
c => c.journeys('900000175013', '900000087171', {
results: 3, tickets: true, stopovers: true, remarks: true, polylines: true
}),
journeysSchema
],
[
dbProfile,
// Siegessäule Berlin to München Hbf
c => c.journeys({
type: 'location', id: '991668043', poi: true,
name: 'Berlin, Siegessäule (Tourismus)',
latitude: 52.515189, longitude: 13.350123
}, '8000261', {
results: 3, tickets: true, stopovers: true, remarks: true, polylines: true
}),
journeysSchema
]
]

const userAgent = 'hafas-client find-unknown-fields'
const fetchResponse = (profile, query) => {
Expand Down
Loading

0 comments on commit 4a88d05

Please sign in to comment.