Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #64 from Turupawn/devel
Browse files Browse the repository at this point in the history
stats examples fix
  • Loading branch information
Turupawn committed Aug 28, 2018
2 parents 6deab01 + a107522 commit 599d634
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/code-samples/c++/49_GetModStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ int main(void)
finished = true;
};

// We request a single mod stats by providing the mod id
u32 mod_id;
std::cout << "Enter the mod id: " << std::endl;
std::cin >> mod_id;
Expand Down
4 changes: 2 additions & 2 deletions examples/code-samples/c++/50_GetAllModStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ int main(void)
finished = true;
};

// Before requesting mods, let's define the query filters
// Before requesting mod stats, let's define the query filters
modio::FilterCreator filter;
filter.setLimit(3);
filter.setCacheMaxAgeSeconds(100);

std::cout << "Getting mods..." << std::endl;

// Now we finished setting up the filters we are ready to request the mods
// Now we finished setting up the filters we are ready to request the stats
modio_instance.getAllModStats(filter, [&](const modio::Response &response, const std::vector<modio::Stats> &mods_stats) {
std::cout << "On mod get response: " << response.code << std::endl;
if (response.code == 200)
Expand Down
2 changes: 1 addition & 1 deletion examples/code-samples/c/49_GetModStats.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int main(void)

bool wait = true;

// We request a single mod stats by providing it's id
// We request a single mod stats by providing the mod id
printf("Please enter the mod id: \n");
u32 mod_id;
scanf("%i", &mod_id);
Expand Down
4 changes: 2 additions & 2 deletions examples/code-samples/c/50_GetAllModStats.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ int main(void)

bool wait = true;

// Before requesting mods, let's define the query filters
// Before requesting mod stats, let's define the query filters
ModioFilterCreator filter;
modioInitFilter(&filter);
modioSetFilterLimit(&filter, 3);

printf("Getting mods stats...\n");

// Now we finished setting up the filters we are ready to request the mods
// Now we finished setting up the filters we are ready to request the stats
modioGetAllModStats(&wait, filter, &onGetAllModStats);

while (wait)
Expand Down

0 comments on commit 599d634

Please sign in to comment.