public class PrivacyUtils extends Object
| Constructor and Description |
|---|
PrivacyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<StravaActivity> |
handlePrivateActivities(List<StravaActivity> activities,
Token token)
Removes private activities from the list (by changing private ones to activities with resourceState=PRIVATE)
|
static List<StravaSegmentEffort> |
handlePrivateSegmentEfforts(List<StravaSegmentEffort> efforts,
Token token)
Returns the list of segments with any that should be flagged as private having their data cleared and resource state set to
StravaResourceState.PRIVATE |
static List<StravaSegment> |
handlePrivateSegments(List<StravaSegment> segments,
Token token)
Removes private segments from the given list (by replacing them with segments with resourceState =
StravaResourceState.PRIVATE |
static StravaActivity |
privateActivity(Integer activityId)
Creates an activity with the given id and resourceState =
StravaResourceState.PRIVATE |
static StravaClub |
privateClubRepresentation(Integer id)
Creates a
StravaClub with resourceState = StravaResourceState.PRIVATE |
static StravaGear |
privateGear(String id)
Creates a
StravaGear with resourceState = StravaResourceState.PRIVATE |
static StravaSegment |
privateSegment(Integer id)
Creates a
StravaSegment with resourceState = StravaResourceState.PRIVATE |
static StravaSegmentEffort |
privateSegmentEffort(Long id)
Creates a
StravaSegmentEffort with resourceState = StravaResourceState.PRIVATE |
static StravaSegmentLeaderboard |
privateSegmentLeaderboard()
Creates a
StravaSegmentLeaderboard with resourceState = StravaResourceState.PRIVATE |
public static List<StravaActivity> handlePrivateActivities(List<StravaActivity> activities, Token token)
Removes private activities from the list (by changing private ones to activities with resourceState=PRIVATE)
activities - The list of activities to processtoken - The access token in use (so we can check if it has view_private acess)public static List<StravaSegmentEffort> handlePrivateSegmentEfforts(List<StravaSegmentEffort> efforts, Token token)
Returns the list of segments with any that should be flagged as private having their data cleared and resource state set to StravaResourceState.PRIVATE
efforts - List of efforts to be 'privatised'token - The access token in usepublic static List<StravaSegment> handlePrivateSegments(List<StravaSegment> segments, Token token)
Removes private segments from the given list (by replacing them with segments with resourceState = StravaResourceState.PRIVATE
segments - The list of segments to be 'privatised'token - The access token being used; will be checked for view_private access for segments belonging to the authenticated userpublic static StravaActivity privateActivity(Integer activityId)
Creates an activity with the given id and resourceState = StravaResourceState.PRIVATE
activityId - the activity id to be given to the private activitypublic static StravaClub privateClubRepresentation(Integer id)
Creates a StravaClub with resourceState = StravaResourceState.PRIVATE
id - The id of the club to createpublic static StravaGear privateGear(String id)
Creates a StravaGear with resourceState = StravaResourceState.PRIVATE
id - The id of the gear to createpublic static StravaSegment privateSegment(Integer id)
Creates a StravaSegment with resourceState = StravaResourceState.PRIVATE
id - The id of the segment to createpublic static StravaSegmentEffort privateSegmentEffort(Long id)
Creates a StravaSegmentEffort with resourceState = StravaResourceState.PRIVATE
id - The id of the effort to createpublic static StravaSegmentLeaderboard privateSegmentLeaderboard()
Creates a StravaSegmentLeaderboard with resourceState = StravaResourceState.PRIVATE
Copyright © 2016 Dan Shannon. All rights reserved.