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
|
||||
{
|
||||
public:
|
||||
apiConfig config;
|
||||
userDetails user;
|
||||
|
||||
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();
|
||||
bool getError() { return this->error; };
|
||||
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();
|
||||
protected:
|
||||
private:
|
||||
apiConfig config;
|
||||
CURL* curlhandle;
|
||||
void setError(const std::string& err);
|
||||
bool error;
|
||||
|
@ -120,7 +120,7 @@ int Downloader::login()
|
||||
std::ofstream ofs(config.sConfigFilePath.c_str());
|
||||
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();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user