mit json rum gespielt
This commit is contained in:
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"liveServer.settings.port": 3001
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
[
|
||||
{
|
||||
"name" : "HoPe_all_flights",
|
||||
"url" : "https://de.dhv-xc.de/api/fli/flights?fkpil%5B%5D=1295&l-fkpil%5B%5D=Hoppe%2C%20Peter&navpars=%7B%22start%22%3A0%2C%22limit%22%3A2000%2C%22sort%22%3A%5B%7B%22field%22%3A%22FlightDate%22%2C%22dir%22%3A-1%7D%2C%7B%22field%22%3A%22BestTaskPoints%22%2C%22dir%22%3A-1%7D%5D%7D"
|
||||
|
||||
"url" : "https://de.dhv-xc.de/api/fli/flights?fkpil%5B%5D=1295&navpars=%7B%22start%22%3A0%2C%22limit%22%3A4000%7D"
|
||||
}
|
||||
]
|
||||
6
docs/GetHoPeAll_lang_url.json
Executable file
6
docs/GetHoPeAll_lang_url.json
Executable file
@ -0,0 +1,6 @@
|
||||
[
|
||||
{
|
||||
"name" : "HoPe_all_flights",
|
||||
"url" : "https://de.dhv-xc.de/api/fli/flights?fkpil%5B%5D=1295&l-fkpil%5B%5D=Hoppe%2C%20Peter&navpars=%7B%22start%22%3A0%2C%22limit%22%3A2000%2C%22sort%22%3A%5B%7B%22field%22%3A%22FlightDate%22%2C%22dir%22%3A-1%7D%2C%7B%22field%22%3A%22BestTaskPoints%22%2C%22dir%22%3A-1%7D%5D%7D"
|
||||
}
|
||||
]
|
||||
0
docs/alex.json
Normal file
0
docs/alex.json
Normal file
1
docs/hoyer.json
Normal file
1
docs/hoyer.json
Normal file
File diff suppressed because one or more lines are too long
8
docs/urlDecode.txt
Normal file
8
docs/urlDecode.txt
Normal file
@ -0,0 +1,8 @@
|
||||
https://de.dhv-xc.de/api/fli/flights?fkpil[]=1295&navpars={"start":0,"limit":4000}
|
||||
|
||||
https://de.dhv-xc.de/api/fli/flights?fkpil%5B%5D=1295&navpars=%7B%22start%22%3A0%2C%22limit%22%3A4000%7D
|
||||
|
||||
|
||||
https://de.dhv-xc.de/api/fli/flights?fkpil[]=1295&l-fkpil[]=Hoppe, Peter&navpars={"start":0,"limit":2000,"sort":[{"field":"FlightDate","dir":-1},{"field":"BestTaskPoints","dir":-1}]}
|
||||
|
||||
https://de.dhv-xc.de/api/fli/flights?fkpil%5B%5D=1295&l-fkpil%5B%5D=Hoppe%2C+Peter&navpars=%7B%22start%22%3A0%2C%22limit%22%3A2000%2C%22sort%22%3A%5B%7B%22field%22%3A%22FlightDate%22%2C%22dir%22%3A-1%7D%2C%7B%22field%22%3A%22BestTaskPoints%22%2C%22dir%22%3A-1%7D%5D%7D
|
||||
@ -2,11 +2,37 @@ import flights from '../data/HoPe_all_flights.json';
|
||||
import {CFlight} from '../classes/CFlight';
|
||||
import {CSeason} from '../classes/CSeason';
|
||||
import {groupByMap} from '../global/tools';
|
||||
import getFlights from '../data/GetAllFlights.json';
|
||||
|
||||
const data_raw = flights.data;
|
||||
export const g_data: CFlight[] = [];
|
||||
export const g_seasondata: CSeason[] = [];
|
||||
|
||||
|
||||
// function GetFlightsFromXcServer(FKpilot: number)
|
||||
// {
|
||||
// var url_raw: string = getFlights[0].url;
|
||||
// const pattern: string = getFlights[0].pattern;
|
||||
// const regex = /XXXXXXXX/gi;
|
||||
// const url = url_raw.replace(regex, FKpilot.toString());
|
||||
|
||||
// var fldata: any;
|
||||
// fetch(url)
|
||||
// .then(function(response)
|
||||
// {
|
||||
// return response.json();
|
||||
// }
|
||||
// ).then(function(myJson)
|
||||
// {
|
||||
// fldata=myJson;
|
||||
// console.log(fldata);
|
||||
// });
|
||||
|
||||
// return fldata;
|
||||
// }
|
||||
|
||||
// const data_raw = GetFlightsFromXcServer(1295).data;
|
||||
|
||||
for (let fl of data_raw)
|
||||
{
|
||||
g_data.push(new CFlight(fl));
|
||||
|
||||
7
src/data/GetAllFlights.json
Executable file
7
src/data/GetAllFlights.json
Executable file
@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"name" : "all_flights",
|
||||
"pattern" : "XXXXXXXX",
|
||||
"url" : "https://de.dhv-xc.de/api/fli/flights?fkpil%5B%5D=XXXXXXXX&navpars=%7B%22start%22%3A0%2C%22limit%22%3A4000%7D"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user