dhisUrl method

  1. @override
Future<String> dhisUrl()
override

Implementation

@override
Future<String> dhisUrl() {
  final apiFields = DhisUrlGenerator.getApiFields(this.query.columns);

  String apiFilter = '';

  if (userGroupsId != null && filterMode != null)
    apiFilter = 'filter=userGroups.$filterMode:in:$userGroupsId';

  return Future.value(
      '${this.query.resourceName}.json${apiFilter != "" ? '?$apiFilter&' : '?'}fields=${(this.selected.isNotEmpty ? this.selected : apiFields).join(',')}&userOrgUnits=${this.userOrgUnits}&includeChildren=${this.includeChildren}&paging=false');
}