PcoServicesSongQuery constructor

PcoServicesSongQuery({
  1. String? whereAuthor,
  2. String? whereCcliNumber,
  3. String? whereHidden,
  4. String? whereThemes,
  5. String? whereTitle,
  6. PcoServicesSongOrder? orderBy,
  7. bool reverse = false,
  8. int perPage = 25,
  9. int pageOffset = 0,
  10. Map<String, String> extraParams = const {},
  11. List<PlanningCenterApiWhere>? where,
  12. Iterable<String> filter = const <String>[],
  13. String? order,
  14. Iterable<String> include = const <String>[],
})

Implementation

PcoServicesSongQuery({
  /// Query by `author`
  /// query on a specific author, url example: ?where[author]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereAuthor,

  /// Query by `ccli_number`
  /// query on a specific ccli_number, url example: ?where[ccli_number]=1
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereCcliNumber,

  /// Query by `hidden`
  /// query on a specific hidden, url example: ?where[hidden]=true
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereHidden,

  /// Query by `themes`
  /// query on a specific themes, url example: ?where[themes]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereThemes,

  /// Query by `title`
  /// query on a specific title, url example: ?where[title]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereTitle,
  PcoServicesSongOrder? orderBy,

  /// reverse the ordering
  bool reverse = false,

  // direct access to super class params
  super.perPage,
  super.pageOffset,
  super.extraParams,
  super.where,
  super.filter,
  super.order,
  super.include,
}) : super() {
  if (whereAuthor != null)
    where.add(PlanningCenterApiWhere.parse('author', whereAuthor));
  if (whereCcliNumber != null)
    where.add(PlanningCenterApiWhere.parse('ccli_number', whereCcliNumber));
  if (whereHidden != null)
    where.add(PlanningCenterApiWhere.parse('hidden', whereHidden));
  if (whereThemes != null)
    where.add(PlanningCenterApiWhere.parse('themes', whereThemes));
  if (whereTitle != null)
    where.add(PlanningCenterApiWhere.parse('title', whereTitle));

  if (orderBy != null) order = orderString(orderBy, reverse: reverse);
}