All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javastrava.service.ChallengeService Maven / Gradle / Ivy

The newest version!
package javastrava.service;

import java.util.List;
import java.util.concurrent.CompletableFuture;

import javastrava.model.StravaChallenge;

/**
 * 

* Interface definitions for the challenge services *

* * @author Dan Shannon * */ public interface ChallengeService extends StravaService { /** *

* Retrieve a challenge *

* *

* Returns a detailed representation of a challenge *

* * @param id * Identifier of the challenge * @return The challenge */ public StravaChallenge getChallenge(Integer id); /** *

* Retrieve a challenge *

* *

* Returns a detailed representation of a challenge *

* * @param id * Identifier of the challenge * @return CompletableFuture which will give access to the challenge */ public CompletableFuture getChallengeAsync(Integer id); /** * Join a challenge on behalf of the authenticated athlete. An access token with write permissions is required. * * @param id * The id of the challenge to be joined */ public void joinChallenge(Integer id); /** * Join a challenge on behalf of the authenticated athlete. An access token with write permissions is required. * * @param id * The id of the challenge to be joined * @return CompletableFuture which will give access to the challenge */ public CompletableFuture joinChallengeAsync(Integer id); /** * Leave a challenge on behalf of the authenticated user. An access token with write permissions is required. * * @param id * The id of the challenge to leave */ public void leaveChallenge(Integer id); /** * Leave a challenge on behalf of the authenticated user. An access token with write permissions is required. * * @param id * The id of the challenge to leave * @return CompletableFuture which will give access to the challenge */ public CompletableFuture leaveChallengeAsync(Integer id); /** * List the challenges the athlete has joined. * * @return Array of challenges that the athlete has joined */ public List listJoinedChallenges(); /** * List the challenges the athlete has joined. * * @return CompletableFuture which will give access to the challenges */ public CompletableFuture> listJoinedChallengesAsync(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy