toJson method

Map<String, dynamic> toJson()

Converts to a JSON map for the request body.

Implementation

Map<String, dynamic> toJson() => {
  'keys': keys,
  'start_at': startAt.toIso8601String(),
  'end_at': endAt.toIso8601String(),
  if (tagAccountsId != null) 'tag_accounts': {'id': tagAccountsId},
  if (tagUsesId != null) 'tag_uses': {'id': tagUsesId},
  if (tagServersId != null) 'tag_servers': {'id': tagServersId},
  if (instanceAccountsDomain != null)
    'instance_accounts': {'domain': instanceAccountsDomain},
  if (instanceMediaAttachmentsDomain != null)
    'instance_media_attachments': {'domain': instanceMediaAttachmentsDomain},
  if (instanceReportsDomain != null)
    'instance_reports': {'domain': instanceReportsDomain},
  if (instanceStatusesDomain != null)
    'instance_statuses': {'domain': instanceStatusesDomain},
  if (instanceFollowsDomain != null)
    'instance_follows': {'domain': instanceFollowsDomain},
  if (instanceFollowersDomain != null)
    'instance_followers': {'domain': instanceFollowersDomain},
};