nn_olv: Added community related API (#873)

- Initialize
- Download communities (self-made / favorites / officials)
- Upload communities (create subcommunity)
- Upload favorite status (Add/Delete favorite to a subcommunity)

Enough for support of Mario Kart 8 tournaments
This commit is contained in:
Rambo6Glaz 2023-06-24 14:51:41 +02:00 committed by GitHub
parent 1beec40445
commit a8d157d310
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 3125 additions and 56 deletions

View file

@ -29,6 +29,7 @@ void NetworkConfig::Load(XMLConfigParser& parser)
urls.IDBE = u.get("idbe", NintendoURLs::IDBEURL);
urls.BOSS = u.get("boss", NintendoURLs::BOSSURL);
urls.TAGAYA = u.get("tagaya", NintendoURLs::TAGAYAURL);
urls.OLV = u.get("olv", NintendoURLs::OLVURL);
if (static_cast<NetworkService>(GetConfig().account.active_service.GetValue()) == NetworkService::Custom)
LaunchSettings::ChangeNetworkServiceURL(2);
}

View file

@ -30,6 +30,7 @@ struct NetworkConfig {
ConfigValue<std::string> IDBE;
ConfigValue<std::string> BOSS;
ConfigValue<std::string> TAGAYA;
ConfigValue<std::string> OLV;
}urls{};
public:
@ -50,6 +51,7 @@ struct NintendoURLs {
inline static std::string IDBEURL = "https://idbe-wup.cdn.nintendo.net/icondata";
inline static std::string BOSSURL = "https://npts.app.nintendo.net/p01/tasksheet";
inline static std::string TAGAYAURL = "https://tagaya.wup.shop.nintendo.net/tagaya/versionlist";
inline static std::string OLVURL = "https://discovery.olv.nintendo.net/v1/endpoint";
};
struct PretendoURLs {
@ -62,6 +64,7 @@ struct PretendoURLs {
inline static std::string IDBEURL = "https://idbe-wup.cdn.pretendo.cc/icondata";
inline static std::string BOSSURL = "https://npts.app.pretendo.cc/p01/tasksheet";
inline static std::string TAGAYAURL = "https://tagaya.wup.shop.pretendo.cc/tagaya/versionlist";
inline static std::string OLVURL = "https://discovery.olv.pretendo.cc/v1/endpoint";
};
typedef XMLDataConfig<NetworkConfig, &NetworkConfig::Load, &NetworkConfig::Save> XMLNetworkConfig_t;