Class ExampleApplication
java.lang.Object
io.smint.clapi.consumer.integration.app.ExampleApplication
Example Java console application to fetch data from the Smint.io API for "demo".
All data synchronized from "demo" is being stored inside a Map
, which is converted to JSON at the end. The
JSON is then written to the console.
Necessary settings and authorization tokens are loaded and stored to the file appsettings.local.json
. The
format is much the same as that one of the C# library. Hence these can be used interchangeably. The file must consist
of a map, where the only value to be read has key "SmintIo"
. All other values are ignored.
An example file content would be:
{ "SmintIo": { "App": { "TenantId": "test", "ChannelId": 3982 }, "Auth": { "ClientId": "test", "ClientSecret": "324poi3lknv234lkj324834" } }, }
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
FILE_NAME_APPSETTINGS_LOCAL
The file name to load settings and authorization data from and store to.FILE_NAME_APPSETTINGS_LOCAL =
"appsettings.local.json"- See Also:
-
FILE_NAME_APPSETTINGS
The file name to load default settings and authorization data from.This file is not being written.
FILE_NAME_APPSETTINGS =
"appsettings.json"- See Also:
-
MAX_SYNCS_THEN_TERMINATE
public static final int MAX_SYNCS_THEN_TERMINATEHow many syncs to perform and then terminate.MAX_SYNCS_THEN_TERMINATE =
2- See Also:
-
-
Constructor Details
-
ExampleApplication
public ExampleApplication()
-
-
Method Details