@Test public void getUserProfile() throws Exception { mockServer.expect(requestTo("https: .andExpect(header("Authorization", "Bearer ACCESS_TOKEN")) .andRespond(withSuccess(new ClassPathResource("profile.json", getClass()), MediaType.APPLICATION_JSON)); StravaAthleteProfile profile = strava.athleteOperations().getAthleteProfile(); assertEquals("John Applestrava", profile.getName()); assertEquals("john@applestrava.com", profile.getEmail()); assertEquals(227615, profile.getId()); assertEquals("http: assertEquals("http: }
public StravaAthleteProfile getAthleteProfile() { return restTemplate.getForObject(buildUri("/athlete"), StravaAthleteProfile.class); }
AthleteTemplate extends AbstractStravaOperations implements AthleteOperations { public StravaAthleteProfile getAthleteProfile() { return restTemplate.getForObject(buildUri("/athlete"), StravaAthleteProfile.class); } }
AthleteTemplate extends AbstractStravaOperations implements AthleteOperations { public StravaAthleteProfile getAthleteProfile() { return restTemplate.getForObject(buildUri("/athlete"), StravaAthleteProfile.class); } AthleteTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); }
AthleteTemplate extends AbstractStravaOperations implements AthleteOperations { public StravaAthleteProfile getAthleteProfile() { return restTemplate.getForObject(buildUri("/athlete"), StravaAthleteProfile.class); } AthleteTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); String getProfileId(); StravaAthleteProfile getAthleteProfile(); String getProfileUrl(); StravaAthleteProfile getAthleteProfileById(String id); List<StravaSegment> getSegments(String user); }
AthleteTemplate extends AbstractStravaOperations implements AthleteOperations { public StravaAthleteProfile getAthleteProfile() { return restTemplate.getForObject(buildUri("/athlete"), StravaAthleteProfile.class); } AthleteTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser); String getProfileId(); StravaAthleteProfile getAthleteProfile(); String getProfileUrl(); StravaAthleteProfile getAthleteProfileById(String id); List<StravaSegment> getSegments(String user);  }