Giter Site home page Giter Site logo

jstrava's People

Contributors

chemikadze avatar conorbb avatar dustedrob avatar loisaidasam avatar mhenfhis avatar mpanasiuk-apptio avatar vitorveras avatar vovsad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jstrava's Issues

List club activities

Retrieve the recent activities performed by members of a specific club. The authenticated athlete must be a member of the club. Pagination is supported.

Parameters
id: integer required
page: integer optional
per_page: integer optional
Returns an array of activity summary representations.

http://strava.github.io/api/v3/clubs/#get-activities

Retrieve segment streams

Only distance, altitude and latlng stream types are available.

Parameters
id: integer required
types: list of strings
single stream type or comma-separated list of types, if the activity does not have that stream it will not be included in the response
resolution: string optional
low (100), medium (1000) or high (10000), default is all,
indicates desired number of data points, streams will only be down sampled
series_type: string relevant only if using resolution
either ‘time’ or ‘distance’, default is ‘distance’,
used to index the streams if the stream is being reduced
Returns an array of unordered stream objects.

http://strava.github.io/api/v3/streams/#segment

Find Athlete KOMs

List athlete K/QOMs/CRs

Returns an array of segment efforts representing KOMs/QOMs and course records held by the given athlete. Results are sorted by date, newest first. Pagination is supported.

Parameters
id: integer required
page: integer optional
per_page: integer optional
Returns an array of segment effort summary representations.

http://strava.github.io/api/v3/athlete/

List starred segment

List starred segment

Returns a summary representation of the segments starred by the authenticated user.

Retrieve effort streams

A segment effort represents an attempt on a segment. This resource returns a subset of the 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.

Parameters
id: integer required
types: list of strings
single stream type or comma-separated list of types, if the activity does not have that stream it will not be included in the response
resolution: string optional
low (100), medium (1000) or high (10000), default is all,
indicates desired number of data points, streams will only be down sampled
series_type: string relevant only if using resolution
either ‘time’ or ‘distance’, default is ‘distance’,
used to index the streams if the stream is being reduced
Returns an array of unordered stream objects.

http://strava.github.io/api/v3/streams/#effort

List activity laps

List activity laps

This resource will return all laps for an activity. Laps are triggered by athletes using their respective devices, such as Garmin watches.

Parameters
id: integer required
Returns an array of lap effort summaries similar to the objects on the right.

http://strava.github.io/api/v3/activities/#laps

Retrieve a Club

Retrieve a club

Retrieve details about a specific club. The club must be public or the current athlete must be a member.

Parameters
id: integer required
Returns a detailed club representation. This is currently the same as the summary representation returned by other calls.

http://strava.github.io/api/v3/clubs/#get-details

Segment Leaderboards

Leaderboards represent the ranking of athletes on specific segments. Filter by age_group and weight_class is only allowed if the authenticated athlete is a Strava premium member.

Parameters
id: integer required
gender: string optional
‘M’ or ‘F’
age_group: string optional
‘0_24’, ‘25_34’, ‘35_44’, ‘45_54’, ‘55_64’, ‘65_plus’
weight_class: string optional
pounds ‘0_124’, ‘125_149’, ‘150_164’, ‘165_179’, ‘180_199’, ‘200_plus’ or kilograms ‘0_54’, ‘55_64’, ‘65_74’, ‘75_84’, ‘85_94’, ‘95_plus’
following: boolean optional
club_id: integer optional
date_range: string optional
‘this_year’, ‘this_month’, ‘this_week’, ‘today’
per_page: integer optional
Returns an array of up to 10, by default, leaderboard entry objects similar to the example response to the right.

http://strava.github.io/api/v3/segments/#leaderboard

Streams entity

Create Streams entity

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.

Object attributes
type: string
data: array
array of stream values
series_type: string
series type used for down sampling, will be present even if not used
original_size: integer
complete stream length
resolution: string
‘low’, ‘medium’ or ‘high’

http://strava.github.io/api/v3/streams/

Segment explorer

This endpoint can be used to find popular segments starting within an area.

Parameters
bounds: floats required
comma separated list of bounding box corners
‘sw.lat,sw.lng,ne.lat,ne.lng’
‘south,west,north,east’
activity_type: string optional
‘running’ or ‘riding’, default is riding
min_cat: integer optional
Minimum climb category filter
max_cat: integer optional
Maximum climb category filter
Returns an array of up to 10 segment objects similar to the example response to the right.

http://strava.github.io/api/v3/segments/#explore

List Photos

List photos

The number of photos is included in the activity summary and detail responses. Use this endpoint to retrieve a list of photos associated with this activity. This endpoint can only be accessed by the owner of the activity.

Parameters
id: integer required
Returns an array of photos objects.

http://strava.github.io/api/v3/photos/

using JStrava

@dustedrob I am looking into to your code for a project. Do you have any thoughts on usage of your code, e.g., type of license?

Parameter support for List of Activity Comments

Currently working without parameters support:

List activity comments

The number of comments is included in the activity summary and detail responses. Use this endpoint to retrieve a list of comments left on a given activity. Pagination is supported.

Parameters
id: integer required
markdown: boolean optional
include markdown in comments, default is false/filter out
page: integer optional
per_page: integer optional

http://strava.github.io/api/v3/comments/

Retrieve activity streams

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 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.

Parameters
id: integer required
types: list of strings
single stream type or comma-separated list of types, if the activity does not have that stream it will not be included in the response
resolution: string optional
low (100), medium (1000) or high (10000), default is all,
indicates desired number of data points, streams will only be down sampled
series_type: string relevant only if using resolution
either ‘time’ or ‘distance’, default is ‘distance’,
used to index the streams if the stream is being reduced

http://strava.github.io/api/v3/streams/#activity

Best way to include it in another Java project?

I'm new to maven, and I'm not sure how I should include the Jstrava project in one of my project. Do I install it locally using "mvn install", do I copy the jstrava.jar generated or do I somehow add this github repo to my build (using maven or something else?). Will there be releases in the future?

Thanks

Parameter Support for List of Activity Kudoers

Currently working without parameters support:

List activity kudoers

The number of kudos is included in the activity summary and detailed representations. This endpoint is for retrieving more detailed information on the athletes who’ve left kudos and can only be accessed by the owner of the activity. Pagination is supported.

Parameters
id: integer required
page: integer optional
per_page: integer optional

http://strava.github.io/api/v3/kudos/

Can not using List<Activity>

I have projects, connect to Strava to get activities of a user. So, I already connected to Strava and get access_token, then I want to use method List activities = strava.getCurrentAthleteActivities(); to get activities of a user but it is not working. Please give me some advice, thank you

Cannot get list of activities (NumberFormatException)

Hi and thanks for providing us with this library – I wanted to give it a shot. Unfortunately I cannot retrieve my activities, which I tried with the following code:

JStravaV3 strava = new JStravaV3(ACCESS_TOKEN);

List<Activity> activities = strava.getCurrentAthleteActivitiesAll().stream()
        .filter(x -> x.getType().equals("StravaActivityType.run"))
        .collect(Collectors.toList());

I get this exception:

Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 40.1 at line 1 column 180 path $[0].total_elevation_gain
	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:245)
	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:235)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)
	at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41)
	at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72)
	at com.google.gson.Gson.fromJson(Gson.java:887)
	at com.google.gson.Gson.fromJson(Gson.java:852)
	at com.google.gson.Gson.fromJson(Gson.java:801)
	at com.google.gson.Gson.fromJson(Gson.java:773)
	at org.jstrava.api.JStravaV3.getCurrentAthleteActivities(JStravaV3.java:309)
	at org.jstrava.api.JStravaV3.getCurrentAthleteActivitiesAll(JStravaV3.java:287)
	at org.vandeseer.stravanalyzor.MainJStrava.getDataFromStrava(MainJStrava.java:31)
	at org.vandeseer.stravanalyzor.MainJStrava.main(MainJStrava.java:19)
Caused by: java.lang.NumberFormatException: Expected an int but was 40.1 at line 1 column 180 path $[0].total_elevation_gain
	at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1196)
	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:243)
	... 13 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.