Warning: session_start(): open(/var/lib/php/sessions/sess_hkd365uhqhjfu92cm6htpmt4j5, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sclass BitGetCredentials {
settable S name;
settable S apiKey;
settable S passphrase;
settable S secretKey;
toString {
ret joinNempties(" with ",
spaceCombine(shortClassName(this), quoteOrEmpty(name)),
commaCombine(
nempty(apiKey) ? "apiKey " + roundBracket(nCharacters(apiKey)) : null,
nempty(passphrase) ? "passphrase " + roundBracket(nCharacters(passphrase)) : null,
nempty(secretKey) ? "secretKey " + roundBracket(nCharacters(secretKey)) : null));
}
static BitGetCredentials fromFile(File f) {
var credMap = parseColonPropertyCIMap(loadTextFile(f));
ret new BitGetCredentials()
.apiKey(credMap.get("API-Key"))
.passphrase(credMap.get("Passphrase"))
.secretKey(credMap.get("SecretKey"))
.name(credMap.get("Name"));
}
void save(File f) {
saveTextFile(f, formatColonProperties(litorderedmap(
"API-Key" := apiKey,
"Passphrase" := passphrase,
"SecretKey" := secretKey,
"Name" := name
)));
}
bool complete() {
ret nempty(apiKey) && nempty(passphrase) && nempty(secretKey);
}
}