Exemplo n.º 1
0
 public void Initialise(bool existing_data, JOB_Common_Parameters common_data)
 {
     Common_data         = new JOB_Common_Parameters();
     Common_data         = common_data;
     S_auth              = new StaticAuthentication(common_data.strava_token);
     client              = new StravaClient(S_auth);
     Activity_details    = new Activities_data();
     Activity_statistics = new JOB_Activities_Stats();
     Utilities           = new JOB_Utilities();
     if (!existing_data)
     {
         Logger.Info("No existing user data present - Creating Athlete Data", "Strava V2.0/JOB_Strava_Client/Initialise");
         Athlete_data = new JOB_Athlete_data(client, common_data.app_path);
         Logger.Info("No existing user data present - Athlete Data created", "Strava V2.0/JOB_Strava_Client/Initialise");
         Logger.Info("No existing user data present - Creating Gear Data", "Strava V2.0/JOB_Strava_Client/Initialise");
         Gear = new JOB_Gear(client, common_data);
         Logger.Info("No existing user data present - Gear Data created", "Strava V2.0/JOB_Strava_Client/Initialise");
     }
     if (existing_data)
     {
         Logger.Info("Existing user data present", "Strava V2.0/JOB_Strava_Client/Initialise");
         Athlete_data = new JOB_Athlete_data(common_data);
         Gear         = new JOB_Gear(client, common_data);
         Activity_statistics.Read_Activities_stats(common_data.activities_stats_filename_fullpath);
         stats_data           = new DataTable();
         stats_data           = Activity_statistics.Calculate_annual_stats();
         annual_stats_by_week = new DataTable();
         annual_stats_by_week = Activity_statistics.Calculate_annual_stats_by_week();
         Logger.Info("Existing user data present - Athlete Data Read and processed", "Strava V2.0/JOB_Strava_Client/Initialise");
     }
 }
Exemplo n.º 2
0
 public void Gear_info(StravaClient client, string Gear_ID, JOB_Gear gear_data, bool imperial)
 {
     bike_name = gear_data.Get_bike_name_by_ID(Gear_ID);
 }