fromJson static method

PublicPostSearchLimits? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static PublicPostSearchLimits? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return PublicPostSearchLimits(
    dailyFreeQueryCount: (json['daily_free_query_count'] as int?) ?? 0,
    remainingFreeQueryCount:
        (json['remaining_free_query_count'] as int?) ?? 0,
    nextFreeQueryIn: (json['next_free_query_in'] as int?) ?? 0,
    starCount: (json['star_count'] as int?) ?? 0,
    isCurrentQueryFree: (json['is_current_query_free'] as bool?) ?? false,
  );
}