Remove mintaka submodule

This commit is contained in:
2024-03-06 18:48:14 -03:00
parent ecf9119639
commit 5dd90202be
15 changed files with 68 additions and 39 deletions

View File

@ -2,8 +2,8 @@
#pragma once
#include <tribufu/prelude.h>
#include <tribufu/options.h>
#include <tribufu/prelude.h>
namespace tribufu
{
@ -15,19 +15,13 @@ namespace tribufu
private:
std::string base_url;
TribufuApiOptions options;
HttpClient http;
public:
TribufuApi();
TribufuApi(std::string api_key);
TribufuApi(TribufuApiOptions options);
~TribufuApi();
static TribufuApi from_env();
static TribufuApi from_env(std::string prefix);
};
}

View File

@ -2,8 +2,8 @@
#pragma once
#include <tribufu/prelude.h>
#include <tribufu/api.h>
#include <tribufu/prelude.h>
namespace tribufu
{
@ -15,9 +15,7 @@ namespace tribufu
public:
TribufuClient(uint64_t id, const std::string &secret);
~TribufuClient();
uint64_t &get_client_id();
};
}

11
include/tribufu/json.h Normal file
View File

@ -0,0 +1,11 @@
// Copyright (c) Tribufu. All Rights Reserved.
#pragma once
#include <tribufu/native.h>
#include <tribufu/prelude.h>
#ifdef TRIBUFU_CPP
#include <nlohmann/json.hpp>
using json = nlohmann::json;
#endif

View File

@ -61,7 +61,8 @@ namespace tribufu
public:
OAuth2AuthorizeRequest();
OAuth2AuthorizeRequest(OAuth2ResponseType response_type, uint64_t client_id, const std::string &client_secret, const std::string &redirect_uri, const std::string &scope, const std::string &state);
OAuth2AuthorizeRequest(OAuth2ResponseType response_type, uint64_t client_id, const std::string &client_secret,
const std::string &redirect_uri, const std::string &scope, const std::string &state);
~OAuth2AuthorizeRequest();
};
@ -87,7 +88,8 @@ namespace tribufu
public:
OAuth2ErrorResponse();
OAuth2ErrorResponse(OAuth2AuthorizeError error, const std::string &error_description, const std::string &error_uri, const std::string &state);
OAuth2ErrorResponse(OAuth2AuthorizeError error, const std::string &error_description,
const std::string &error_uri, const std::string &state);
~OAuth2ErrorResponse();
};
@ -105,7 +107,9 @@ namespace tribufu
public:
OAuth2TokenRequest();
OAuth2TokenRequest(OAuth2GrantType grant_type, uint64_t client_id, const std::string &client_secret, const std::string &redirect_uri, const std::string &code, const std::string &refresh_token, const std::string &username, const std::string &password);
OAuth2TokenRequest(OAuth2GrantType grant_type, uint64_t client_id, const std::string &client_secret,
const std::string &redirect_uri, const std::string &code, const std::string &refresh_token,
const std::string &username, const std::string &password);
~OAuth2TokenRequest();
};
@ -121,7 +125,9 @@ namespace tribufu
public:
OAuth2TokenResponse();
OAuth2TokenResponse(OAuth2TokenType token_type, const std::string &access_token, const std::string &refresh_token, const std::string &scope, const std::string &state, uint64_t expires_in);
OAuth2TokenResponse(OAuth2TokenType token_type, const std::string &access_token,
const std::string &refresh_token, const std::string &scope, const std::string &state,
uint64_t expires_in);
~OAuth2TokenResponse();
};
}

View File

@ -0,0 +1,21 @@
// Copyright (c) Tribufu. All Rights Reserved.
#pragma once
#ifdef _WIN32
#ifndef DLLEXPORT
#define DLLEXPORT __declspec(dllexport)
#endif
#ifndef DLLIMPORT
#define DLLIMPORT __declspec(dllimport)
#endif
#endif
#ifdef __MACH__ || __APPLE__ || __linux__ || __FreeBSD__ || __ANDROID__
#ifndef DLLEXPORT
#define DLLEXPORT __attribute__((visibility("default")))
#endif
#ifndef DLLIMPORT
#define DLLIMPORT __attribute__((visibility("default")))
#endif
#endif

View File

@ -2,12 +2,7 @@
#pragma once
#include <mintaka/framework.h>
#include <tribufu/json.h>
#include <tribufu/macros.h>
#include <tribufu/native.h>
#ifdef TRIBUFU_CPP
using namespace mintaka;
#endif
#include <tribufu/platform.h>

View File

@ -2,8 +2,8 @@
#pragma once
#include <tribufu/prelude.h>
#include <tribufu/client.h>
#include <tribufu/prelude.h>
namespace tribufu
{
@ -14,9 +14,7 @@ namespace tribufu
public:
TribufuServer(uint64_t server_id, uint64_t client_id, const std::string &client_secret);
~TribufuServer();
uint64_t &get_server_id();
};
}