<commit_before>import 'package:campus_mobile_experimental/core/models/availability_model.dart';
import 'package:campus_mobile_experimental/core/services/networking.dart';

class AvailabilityService {
  AvailabilityService() {}
  bool _isLoading = false;
  DateTime _lastUpdated;
  String _error;
  List<AvailabilityModel> _data;

  /// add state related things for view model here
  /// add any type of data manipulation here so it can be accessed via provider

  List<AvailabilityModel> get data => _data;

  final NetworkHelper _networkHelper = NetworkHelper();
  final Map<String, String> headers = {
    "accept": "application/json",
  };
  final String endpoint = "https://ucsd-mobile-dev.s3-us-west-1.amazonaws.com/mock-apis/occuspace/availability-mock-api.json";

  Future<bool> fetchData() async {
    _error = null;
    _isLoading = true;
    try {
      /// fetch data
      String _response = await _networkHelper.authorizedFetch(endpoint, headers);

      /// parse data
      final data = availabilityModelFromJson(_response);
      _isLoading = false;

      _data = data;
      return true;<commit_msg>Updated availability_service endpoint<commit_after>import 'package:campus_mobile_experimental/core/models/availability_model.dart';
import 'package:campus_mobile_experimental/core/services/networking.dart';

class AvailabilityService {
  AvailabilityService() {}
  bool _isLoading = false;
  DateTime _lastUpdated;
  String _error;
  List<AvailabilityModel> _data;

  /// add state related things for view model here
  /// add any type of data manipulation here so it can be accessed via provider

  List<AvailabilityModel> get data => _data;

  final NetworkHelper _networkHelper = NetworkHelper();
  final Map<String, String> headers = {
    "accept": "application/json",
  };
  final String endpoint = "https://api-qa.ucsd.edu:8243/occuspace/v1.0/busyness";

  Future<bool> fetchData() async {
    _error = null;
    _isLoading = true;
    try {
      /// fetch data
      String _response = await _networkHelper.authorizedFetch(endpoint, headers);

      /// parse data
      final data = availabilityModelFromJson(_response);
      _isLoading = false;

      _data = data;
      return true;
{'fraction_non_alphanumeric': 0.09896068685042927, 'fraction_numerical': 0.0036150022593764122, 'mean_word_length': 3.823529411764706, 'pattern_counts': {'":': 2, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3943548', 'n_tokens_mistral': 643, 'n_tokens_neox': 613, 'n_words': 165}