javastrava.api.v3.service.StreamService Maven / Gradle / Ivy
Show all versions of javastrava-api Show documentation
package javastrava.api.v3.service;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import javastrava.api.v3.model.StravaActivity;
import javastrava.api.v3.model.StravaSegment;
import javastrava.api.v3.model.StravaSegmentEffort;
import javastrava.api.v3.model.StravaStream;
import javastrava.api.v3.model.reference.StravaStreamResolutionType;
import javastrava.api.v3.model.reference.StravaStreamSeriesDownsamplingType;
import javastrava.api.v3.model.reference.StravaStreamType;
import javastrava.api.v3.service.exception.UnauthorizedException;
/**
*
* Streams is the Strava term for the raw data associated with an activity. All streams for a given activity or segment effort will be the same length and the
* values at a given index correspond to the same time.
*
*
* @author Dan Shannon
*
*/
public interface StreamService extends StravaService {
/**
*
* Streams represent the raw data of the uploaded file. External applications may only access this information for activities owned by the authenticated
* athlete.
*
*
*
* While there are a large number of {@link StravaStreamType stream types}, they may not exist for all activities. If a stream type does not exist for the
* activity, it will be ignored.
*
*
*
* All streams for a given activity will be the same length and the values at a given index correspond to the same time. For example, the time from the time
* stream can be correlated to the lat/lng or watts streams.
*
*
*
* Privacy Zones
*
*
*
* StravaStream requests made using a public access_token will be cropped with the user's privacy zones, regardless if the requesting athlete owns the
* requested activity. To fetch the complete stream data use an access_token with view_private permissions.
*
*
*
* URL GET https://www.strava.com/api/v3/activities/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#activity
*
* @param activityId
* The id of the activity for which streams are to be retrieved
* @return Returns an array of unordered stream objects, or null
if the activity doesn't exist
* @throws UnauthorizedException
* If there is a security exception
*/
public List getActivityStreams(final Long activityId);
/**
*
* Streams represent the raw data of the uploaded file. External applications may only access this information for activities owned by the authenticated
* athlete.
*
*
*
* While there are a large number of {@link StravaStreamType stream types}, they may not exist for all activities. If a stream type does not exist for the
* activity, it will be ignored.
*
*
*
* All streams for a given activity will be the same length and the values at a given index correspond to the same time. For example, the time from the time
* stream can be correlated to the lat/lng or watts streams.
*
*
*
* Privacy Zones
*
*
*
* StravaStream requests made using a public access_token will be cropped with the user's privacy zones, regardless if the requesting athlete owns the
* requested activity. To fetch the complete stream data use an access_token with view_private permissions.
*
*
*
* URL GET https://www.strava.com/api/v3/activities/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#activity
*
* @param activityId
* The id of the activity for which streams are to be retrieved
* @param types
* List of types, if the activity does not have that stream it will not be included in the response
* @param resolution
* (Optional) low (100), medium (1000) or high (10000), default is all, indicates desired number of data points, streams will only be down
* sampled
* @param seriesType
* (Optional) relevant only if using resolution. Either "time" or "distance", default is "distance", used to index the streams if the stream is
* being reduced
* @return Returns an array of unordered stream objects, or null
if the activity doesn't exist
* @throws UnauthorizedException
* If there is a security exception
*/
public List getActivityStreams(final Long activityId, final StravaStreamResolutionType resolution, final StravaStreamSeriesDownsamplingType seriesType,
final StravaStreamType... types);
/**
*
* Streams represent the raw data of the uploaded file. External applications may only access this information for activities owned by the authenticated
* athlete.
*
*
*
* While there are a large number of {@link StravaStreamType stream types}, they may not exist for all activities. If a stream type does not exist for the
* activity, it will be ignored.
*
*
*
* All streams for a given activity will be the same length and the values at a given index correspond to the same time. For example, the time from the time
* stream can be correlated to the lat/lng or watts streams.
*
*
*
* Privacy Zones
*
*
*
* StravaStream requests made using a public access_token will be cropped with the user's privacy zones, regardless if the requesting athlete owns the
* requested activity. To fetch the complete stream data use an access_token with view_private permissions.
*
*
*
* URL GET https://www.strava.com/api/v3/activities/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#activity
*
* @param activityId
* The id of the activity for which streams are to be retrieved
* @return Returns an array of unordered stream objects, or null
if the activity doesn't exist
* @throws UnauthorizedException
* If there is a security exception
*/
public CompletableFuture> getActivityStreamsAsync(final Long activityId);
/**
*
* Streams represent the raw data of the uploaded file. External applications may only access this information for activities owned by the authenticated
* athlete.
*
*
*
* While there are a large number of {@link StravaStreamType stream types}, they may not exist for all activities. If a stream type does not exist for the
* activity, it will be ignored.
*
*
*
* All streams for a given activity will be the same length and the values at a given index correspond to the same time. For example, the time from the time
* stream can be correlated to the lat/lng or watts streams.
*
*
*
* Privacy Zones
*
*
*
* StravaStream requests made using a public access_token will be cropped with the user's privacy zones, regardless if the requesting athlete owns the
* requested activity. To fetch the complete stream data use an access_token with view_private permissions.
*
*
*
* URL GET https://www.strava.com/api/v3/activities/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#activity
*
* @param activityId
* The id of the activity for which streams are to be retrieved
* @param types
* List of types, if the activity does not have that stream it will not be included in the response
* @param resolution
* (Optional) low (100), medium (1000) or high (10000), default is all, indicates desired number of data points, streams will only be down
* sampled
* @param seriesType
* (Optional) relevant only if using resolution. Either "time" or "distance", default is "distance", used to index the streams if the stream is
* being reduced
* @return Returns an array of unordered stream objects, or null
if the activity doesn't exist
* @throws UnauthorizedException
* If there is a security exception
*/
public CompletableFuture> getActivityStreamsAsync(final Long activityId, final StravaStreamResolutionType resolution, final StravaStreamSeriesDownsamplingType seriesType,
final StravaStreamType... types);
/**
*
* A {@link StravaSegmentEffort segment effort} represents an attempt on a {@link StravaSegment segment}. This resource returns a subset of the
* {@link StravaActivity activity} streams that correspond to that effort.
*
*
*
* All streams for a given segment effort will be the same length and the values at a given index correspond to the same time.
*
*
*
* This resource is available for all public efforts.
*
*
*
* URL GET https://www.strava.com/api/v3/segment_efforts/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#effort
*
* @param effortId
* The id of the segment effort for which streams are to be retrieved
* @return Returns an array of unordered stream objects.
*/
public List getEffortStreams(final Long effortId);
/**
*
* A {@link StravaSegmentEffort segment effort} represents an attempt on a {@link StravaSegment segment}. This resource returns a subset of the
* {@link StravaActivity activity} streams that correspond to that effort.
*
*
*
* All streams for a given segment effort will be the same length and the values at a given index correspond to the same time.
*
*
*
* This resource is available for all public efforts.
*
*
*
* URL GET https://www.strava.com/api/v3/segment_efforts/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#effort
*
* @param effortId
* The id of the segment effort for which streams are to be retrieved
* @param types
* List of types, if the effort does not have that stream it will not be included in the response
* @param resolution
* (Optional) low (100), medium (1000) or high (10000), default is all, indicates desired number of data points, streams will only be down
* sampled
* @param seriesType
* (Optional) relevant only if using resolution. Either "time" or "distance", default is "distance", used to index the streams if the stream is
* being reduced
* @return Returns an array of unordered stream objects.
*/
public List getEffortStreams(final Long effortId, final StravaStreamResolutionType resolution, final StravaStreamSeriesDownsamplingType seriesType,
final StravaStreamType... types);
/**
*
* A {@link StravaSegmentEffort segment effort} represents an attempt on a {@link StravaSegment segment}. This resource returns a subset of the
* {@link StravaActivity activity} streams that correspond to that effort.
*
*
*
* All streams for a given segment effort will be the same length and the values at a given index correspond to the same time.
*
*
*
* This resource is available for all public efforts.
*
*
*
* URL GET https://www.strava.com/api/v3/segment_efforts/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#effort
*
* @param effortId
* The id of the segment effort for which streams are to be retrieved
* @return Returns an array of unordered stream objects.
*/
public CompletableFuture> getEffortStreamsAsync(final Long effortId);
/**
*
* A {@link StravaSegmentEffort segment effort} represents an attempt on a {@link StravaSegment segment}. This resource returns a subset of the
* {@link StravaActivity activity} streams that correspond to that effort.
*
*
*
* All streams for a given segment effort will be the same length and the values at a given index correspond to the same time.
*
*
*
* This resource is available for all public efforts.
*
*
*
* URL GET https://www.strava.com/api/v3/segment_efforts/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#effort
*
* @param effortId
* The id of the segment effort for which streams are to be retrieved
* @param types
* List of types, if the effort does not have that stream it will not be included in the response
* @param resolution
* (Optional) low (100), medium (1000) or high (10000), default is all, indicates desired number of data points, streams will only be down
* sampled
* @param seriesType
* (Optional) relevant only if using resolution. Either "time" or "distance", default is "distance", used to index the streams if the stream is
* being reduced
* @return Returns an array of unordered stream objects.
*/
public CompletableFuture> getEffortStreamsAsync(final Long effortId, final StravaStreamResolutionType resolution, final StravaStreamSeriesDownsamplingType seriesType,
final StravaStreamType... types);
/**
*
* Retrieve detailed geographical information streams about a specific {@link StravaSegment}.
*
*
*
* Only distance, altitude and latlng stream types are available.
*
*
*
* URL GET https://www.strava.com/api/v3/segments/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#segment
*
* @param segmentId
* The id of the segment for which streams are to be retrieved
* @return Returns an array of unordered stream objects.
*/
public List getSegmentStreams(final Integer segmentId);
/**
*
* Retrieve detailed geographical information streams about a specific {@link StravaSegment}.
*
*
*
* Only distance, altitude and latlng stream types are available.
*
*
*
* URL GET https://www.strava.com/api/v3/segments/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#segment
*
* @param segmentId
* The id of the segment for which streams are to be retrieved
* @param types
* List of types, if the segment does not have that stream it will not be included in the response
* @param resolution
* (Optional) low (100), medium (1000) or high (10000), default is all, indicates desired number of data points, streams will only be down
* sampled
* @param seriesType
* (Optional) relevant only if using resolution. Either "time" or "distance", default is "distance", used to index the streams if the stream is
* being reduced
* @return Returns an array of unordered stream objects.
*/
public List getSegmentStreams(final Integer segmentId, final StravaStreamResolutionType resolution, final StravaStreamSeriesDownsamplingType seriesType,
final StravaStreamType... types);
/**
*
* Retrieve detailed geographical information streams about a specific {@link StravaSegment}.
*
*
*
* Only distance, altitude and latlng stream types are available.
*
*
*
* URL GET https://www.strava.com/api/v3/segments/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#segment
*
* @param segmentId
* The id of the segment for which streams are to be retrieved
* @return Returns an array of unordered stream objects.
*/
public CompletableFuture> getSegmentStreamsAsync(final Integer segmentId);
/**
*
* Retrieve detailed geographical information streams about a specific {@link StravaSegment}.
*
*
*
* Only distance, altitude and latlng stream types are available.
*
*
*
* URL GET https://www.strava.com/api/v3/segments/:id/streams/:types
*
*
* @see http://strava.github.io/api/v3/streams/#segment
*
* @param segmentId
* The id of the segment for which streams are to be retrieved
* @param types
* List of types, if the segment does not have that stream it will not be included in the response
* @param resolution
* (Optional) low (100), medium (1000) or high (10000), default is all, indicates desired number of data points, streams will only be down
* sampled
* @param seriesType
* (Optional) relevant only if using resolution. Either "time" or "distance", default is "distance", used to index the streams if the stream is
* being reduced
* @return Returns an array of unordered stream objects.
*/
public CompletableFuture> getSegmentStreamsAsync(final Integer segmentId, final StravaStreamResolutionType resolution, final StravaStreamSeriesDownsamplingType seriesType,
final StravaStreamType... types);
}