build method

GetQuery build()

Construct parameters

Implementation

GetQuery build() {
  var what = [];
  Map<String, dynamic>? params = <String, dynamic>{};
  ['data', 'sub', 'desc', 'tags', 'cred', 'del'].forEach((key) {
    if (this.what.containsKey(key)) {
      what.add(key);
      params![key] = this.what[key];
    }
  });
  if (what.isNotEmpty) {
    params['what'] = what.join(' ');
  } else {
    params = null;
  }
  return GetQuery.fromMessage(params ?? {});
}