mirror of
https://github.com/zoriya/flood.git
synced 2025-12-19 13:45:15 +00:00
Add setTaxonomy method call
This commit is contained in:
@@ -290,6 +290,24 @@ class ClientRequest {
|
||||
});
|
||||
}
|
||||
|
||||
setTaxonomyMethodCall(options) {
|
||||
let methodName = 'd.custom1.set';
|
||||
|
||||
let tags = options.tags.reduce((memo, currentTag) => {
|
||||
let tag = currentTag.trim();
|
||||
|
||||
if (tag !== '' && memo.indexOf(tag) === -1) {
|
||||
memo.push(tag);
|
||||
}
|
||||
|
||||
return memo;
|
||||
}, []).join(',');
|
||||
|
||||
this.getEnsuredArray(options.hashes).forEach((hash) => {
|
||||
this.requests.push(this.getMethodCall(methodName, [hash, tags]));
|
||||
});
|
||||
}
|
||||
|
||||
setThrottleMethodCall(options) {
|
||||
let methodName = 'throttle.global_down.max_rate.set';
|
||||
if (options.direction === 'upload') {
|
||||
|
||||
Reference in New Issue
Block a user