mirror of
https://github.com/sebastiandine/Card-Collection-Manager-3.git
synced 2026-08-29 01:08:49 +00:00
24 lines
569 B
C++
24 lines
569 B
C++
#pragma once
|
|
|
|
// YuGiOhSetSource: ISetSource implementation for Yu-Gi-Oh via YGOPRODeck.
|
|
|
|
#include "ccm/games/IGameModule.hpp"
|
|
#include "ccm/ports/IHttpClient.hpp"
|
|
|
|
namespace ccm {
|
|
|
|
class YuGiOhSetSource final : public ISetSource {
|
|
public:
|
|
static constexpr const char* kEndpoint = "https://db.ygoprodeck.com/api/v7/cardsets.php";
|
|
|
|
explicit YuGiOhSetSource(IHttpClient& http);
|
|
|
|
Result<std::vector<Set>> fetchAll() override;
|
|
static Result<std::vector<Set>> parseResponse(const std::string& body);
|
|
|
|
private:
|
|
IHttpClient& http_;
|
|
};
|
|
|
|
} // namespace ccm
|