Skip to content

Commit e02f479

Browse files
committed
allow custom init dicitionary
1 parent cd92210 commit e02f479

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

source/gameanalytics/GAHTTPApi.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ namespace gameanalytics
5252
}
5353

5454
EGAHTTPApiResponse GAHTTPApi::requestInitReturningDict(json& json_out, std::string const& configsHash)
55+
{
56+
json initAnnotations;
57+
state::GAState::getInitAnnotations(initAnnotations);
58+
59+
return requestInitReturningDict(json_out, initAnnotations, configsHash);
60+
}
61+
62+
EGAHTTPApiResponse GAHTTPApi::requestInitReturningDict(json& json_out, json& initAnnotations, std::string const& configsHash)
5563
{
5664
std::string gameKey = state::GAState::getGameKey();
5765

@@ -60,9 +68,6 @@ namespace gameanalytics
6068

6169
logging::GALogger::d("Sending 'init' URL: %s", url.c_str());
6270

63-
json initAnnotations;
64-
state::GAState::getInitAnnotations(initAnnotations);
65-
6671
try
6772
{
6873
std::string jsonString = initAnnotations.dump();

source/gameanalytics/GAHTTPApi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ namespace gameanalytics
131131
static GAHTTPApi& getInstance();
132132

133133
EGAHTTPApiResponse requestInitReturningDict(json& json_out, std::string const& configsHash);
134+
EGAHTTPApiResponse requestInitReturningDict(json& json_out, json& initAnnotations, std::string const& configsHash);
134135
EGAHTTPApiResponse sendEventsInArray(json& json_out, const json& eventArray);
135136
void sendSdkErrorEvent(EGASdkErrorCategory category, EGASdkErrorArea area, EGASdkErrorAction action, EGASdkErrorParameter parameter, std::string const& reason, std::string const& gameKey, std::string const& secretKey);
136137

0 commit comments

Comments
 (0)