abraker95 / osu-api-cpp Goto Github PK
View Code? Open in Web Editor NEWA C++ API for interfacing with the Osu API: https://github.com/peppy/osu-api/wiki
A C++ API for interfacing with the Osu API: https://github.com/peppy/osu-api/wiki
Because I accidentally deleted it
The data contents end up being blank.
I believe the root cause has to do something with the downloader. Upon closer examination using debugging tools, I've found that the URL is not being properly read as soon as the debugger enters download.cpp. Passing it as a string didn't help either as I am suspecting it gets lost during the typecast to a char*.
Line(s) of code suspected:
Download.cpp: 60 - 73
Sugestion by Soinou (https://osu.ppy.sh/forum/p/4199805)
Instead of something like:
params[U32 PARAM:game_mode] = "something";
params[U32 PARAM:limit] = 50;
you could do:
enum Parameter
{
kGameMode = 0,
kLimit = 1
}
params[Parameter::kGameMode] = "something";
params[Parameter::kLimit] = 50;
And your parameters could be defined in a map<int, string> or even better, in a custom class, where your [] operator would look like:
operator[] (Parameter param)
{
switch(param)
{
case Parameter::kGameMode:
// Handle game mode setter
break;
case Parameter::kLimit:
// Handle limit setter
break;
default:
break;
}
}
Suggestion by Soinou (https://osu.ppy.sh/forum/p/4199805)
Something like an Osu::User that will contain all the informations parsed from the json.
For example:
namespace Osu
{
struct User
{
long id;
std::string username;
...
}
}
This would be way better to understand and to use than a vector, and would be less prone to errors.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.