mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-02 05:52:31 +01:00
Made API config private member
This commit is contained in:
parent
bc787e5f6c
commit
7a9dd503a1
@ -70,7 +70,6 @@ size_t writeMemoryCallback(char *ptr, size_t size, size_t nmemb, void *userp);
|
|||||||
class API
|
class API
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
apiConfig config;
|
|
||||||
userDetails user;
|
userDetails user;
|
||||||
|
|
||||||
API(const std::string& token,const std::string& secret, const bool& verbose = false, const bool& bVerifyPeer = true);
|
API(const std::string& token,const std::string& secret, const bool& verbose = false, const bool& bVerifyPeer = true);
|
||||||
@ -88,9 +87,12 @@ class API
|
|||||||
void clearError();
|
void clearError();
|
||||||
bool getError() { return this->error; };
|
bool getError() { return this->error; };
|
||||||
std::string getErrorMessage() { return this->error_message; };
|
std::string getErrorMessage() { return this->error_message; };
|
||||||
|
std::string getToken() { return this->config.oauth_token; };
|
||||||
|
std::string getSecret() { return this->config.oauth_secret; };
|
||||||
virtual ~API();
|
virtual ~API();
|
||||||
protected:
|
protected:
|
||||||
private:
|
private:
|
||||||
|
apiConfig config;
|
||||||
CURL* curlhandle;
|
CURL* curlhandle;
|
||||||
void setError(const std::string& err);
|
void setError(const std::string& err);
|
||||||
bool error;
|
bool error;
|
||||||
|
@ -120,7 +120,7 @@ int Downloader::login()
|
|||||||
std::ofstream ofs(config.sConfigFilePath.c_str());
|
std::ofstream ofs(config.sConfigFilePath.c_str());
|
||||||
if (ofs)
|
if (ofs)
|
||||||
{
|
{
|
||||||
ofs << "token = " << gogAPI->config.oauth_token << std::endl << "secret = " << gogAPI->config.oauth_secret << std::endl;
|
ofs << "token = " << gogAPI->getToken() << std::endl << "secret = " << gogAPI->getSecret() << std::endl;
|
||||||
ofs.close();
|
ofs.close();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user