getApiKeyWithBaseUrl function
Retrieves the API key and data center URL for the account configuration.
Returns a map containing the API key and data center URL. The API key is retrieved using the getApiKey function, and the data center URL is retrieved using the getDataCenterUrl function. The map has the following structure: { 'apiKey': apiKey, 'dataCenterUrl': dataCenterUrl, }
Example usage:
final accountConfig = await getAccountConfig();
print(accountConfig['apiKey']);
print(accountConfig['dataCenterUrl']);
Implementation
Future<Map<String, String>> getApiKeyWithBaseUrl() async {
final apiKey = await getApiKey();
final dataCenterUrl = await getDataCenterUrl();
return {
'apiKey': apiKey,
'dataCenterUrl': dataCenterUrl,
};
}