mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-14 00:30:31 +00:00
AbstractHafasClientInterfaceProvider: Support for 'ext' configuration.
This commit is contained in:
parent
43647e7c77
commit
12f597fe78
3 changed files with 17 additions and 0 deletions
|
@ -87,6 +87,8 @@ public abstract class AbstractHafasClientInterfaceProvider extends AbstractHafas
|
|||
@Nullable
|
||||
private String apiVersion;
|
||||
@Nullable
|
||||
private String apiExt;
|
||||
@Nullable
|
||||
private String apiAuthorization;
|
||||
@Nullable
|
||||
private String apiClient;
|
||||
|
@ -117,6 +119,11 @@ public abstract class AbstractHafasClientInterfaceProvider extends AbstractHafas
|
|||
return this;
|
||||
}
|
||||
|
||||
protected AbstractHafasClientInterfaceProvider setApiExt(final String apiExt) {
|
||||
this.apiExt = checkNotNull(apiExt);
|
||||
return this;
|
||||
}
|
||||
|
||||
protected AbstractHafasClientInterfaceProvider setApiAuthorization(final String apiAuthorization) {
|
||||
this.apiAuthorization = apiAuthorization;
|
||||
return this;
|
||||
|
@ -704,6 +711,7 @@ public abstract class AbstractHafasClientInterfaceProvider extends AbstractHafas
|
|||
return "{" //
|
||||
+ (apiAuthorization != null ? "\"auth\":" + apiAuthorization + "," : "") //
|
||||
+ "\"client\":" + checkNotNull(apiClient) + "," //
|
||||
+ (apiExt != null ? "\"ext\":\"" + apiExt + "\"," : "") //
|
||||
+ "\"ver\":\"" + checkNotNull(apiVersion) + "\",\"lang\":\"eng\"," //
|
||||
+ "\"svcReqL\":[" //
|
||||
+ "{\"meth\":\"ServerInfo\",\"req\":{\"getServerDateTime\":true,\"getTimeTablePeriod\":false}}," //
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue