/**
 * Copyright (c) 2015 Werner Keil
 * 
 * See LICENSE for details.
 */
package org.jstrava.demo;

import java.util.Properties;






import org.jstrava.connector.JStravaV3;
import org.jstrava.entities.activity.Activity;
//import org.apache.logging.log4j.LogManager;
//import org.apache.logging.log4j.Logger;
import org.jstrava.entities.athlete.Athlete;
import org.jstrava.entities.club.Club;

/**
 * Created by keilw on 12/04/14.
 * Updated by keilw on 24/02/15.
 */
public class StravaDemo {
	private static String accessToken;
	private static int athleteId;
	private static int activityId;
	private static int updateActivityId;
	private static int clubId;
	private static String gearId;
	private static long segmentId;

	public static void main(String[] args) throws Exception {
		final Properties config = new Properties();
		config.load(StravaDemo.class.getResourceAsStream("/democonfig.properties"));

        accessToken = config.getProperty("accessToken");
        activityId = Integer.parseInt(config.getProperty("activityId", "0"));
		JStravaV3 strava = new JStravaV3(accessToken);
		
		Athlete athlete = strava.getCurrentAthlete();
		System.out.println("Athlete: " + athlete);
		
		Activity activity = strava.findActivity(activityId);
		System.out.println("City: " + activity.getLocation_city());
		
		clubId = Integer.parseInt(config.getProperty("clubId", "0"));
		Club club = strava.findClub(clubId);
		System.out.println("Club: " + club);
	}

}

@@ -124,21 +124,16 @@
 rties;%0A%0A
-%0A%0A%0A%0A%0A
 import o
@@ -215,96 +215,8 @@
 ty;%0A
-//import org.apache.logging.log4j.LogManager;%0A//import org.apache.logging.log4j.Logger;%0A
 impo
@@ -360,13 +360,13 @@
  on 
-24/02
+05/11
 /15.
@@ -818,16 +818,17 @@
         
+%09
 accessTo
@@ -876,16 +876,17 @@
         
+%09
 activity
@@ -1361,10 +1361,9 @@
 b);%0A
+
 %09%7D%0A
-%0A
 %7D%0A

Update StravaDemo.java