eckhchri / pcars-ds-liveview

Provides a html page for project cars dedicated server and display a map of the current race.
14 stars 1 forks source link

Move the API path mapping from Receive_DS_data function to config file - for later use in combination with node proxy #156

Closed viper4gh closed 4 years ago

viper4gh commented 4 years ago

Currently the mapping exists in the Receive_DS_data function:

var aReceiveModes = {
                "GETDSANDDRIVERDATA"    : "/api/session/status?attributes&members&participants",
                "GETDS2ANDDRIVERDATA"   : "/api/session/status?attributes&members&participants",
                "GETTRACKLIST"          : "/api/list/tracks",
                "GETVEHICLELIST"        : "/api/list/vehicles",
                "GETCRESTDRIVERDATA"    : "/crest/v1/api?gameStates=true&participants=true&eventInformation=true&timings=true&weather=true",
                "GETCREST2DRIVERDATA"   : "/crest2/v1/api?gameStates=true&participants=true&eventInformation=true&timings=true&weather=true",
                "GETCREST2AMS2DRIVERDATA"   : "/crest2/v1/api?gameStates=true&participants=true&eventInformation=true&timings=true&weather=true",
                //"GETCREST2AMS2DRIVERDATA" : "",   // Test with liveview-node
                "GETDEMODATA"           : ""
    };
viper4gh commented 4 years ago

implemented