strava | JavaScript wrapper for the Strava JSON API | REST library

 by   rfoel TypeScript Version: 2.3.0 License: MIT

kandi X-RAY | strava Summary

kandi X-RAY | strava Summary

strava is a TypeScript library typically used in Web Services, REST applications. strava has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This library is a fully typed JavaScript wrapper of the Strava JSON API.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              strava has a low active ecosystem.
              It has 8 star(s) with 6 fork(s). There are 1 watchers for this library.
              There were 1 major release(s) in the last 6 months.
              There are 0 open issues and 4 have been closed. On average issues are closed in 26 days. There are 10 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of strava is 2.3.0

            kandi-Quality Quality

              strava has no bugs reported.

            kandi-Security Security

              strava has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              strava is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              strava releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of strava
            Get all kandi verified functions for this library.

            strava Key Features

            No Key Features are available at this moment for strava.

            strava Examples and Code Snippets

            No Code Snippets are available at this moment for strava.

            Community Discussions

            QUESTION

            Unable to get accessToken via Axios in React
            Asked 2021-Jun-11 at 14:45

            Trying to get the access token from my first axios call and place it into the 2nd. My component is like so.

            When i log accessToken to the console its an empty array. When i console.log(response.data) I can see the response and my access_token

            ...

            ANSWER

            Answered 2021-Jun-11 at 14:45

            The problem here is you're keeping the token in the state, and once you update the state in the middle of the function, the value is not updated synchronously, thus you're still getting an empty array. I would rephrase your useEffect with an async/await syntax like so:

            Source https://stackoverflow.com/questions/67938798

            QUESTION

            How can I upload Kayaking or Rowing data via a TCX formatted file to Strava?
            Asked 2021-May-04 at 21:19

            I'm recording workouts with a Flutter based mobile application. I can successfully upload bike workouts. https://github.com/BirdyF/strava_flutter/blob/master/lib/Models/activity.dart#L916 lists a pretty wide variety of sports. However I already noticed that "VirtualRide" reverts to a regular bike ride once it is uploaded to Strava.

            Now as I'm uploading Kayaking data it also shows up as a bike ride as well (in the middle of a small lake). But at least it has the speed and the rpm (which is actually strokes per minute for kayaking). However if I switch that activity over to Kayaking on Strava's UI Strava stops showing the pace (speed) and the rpm.

            I peeked at https://github.com/sanderroosendaal/rowingdata/blob/master/rowingdata/writetcx.py and that seems to output the rowing activities as "Other" sport. Its tests contain such TCXs as well. I just cannot believe TCX would be so limited. Does anyone have a pointer for me to solve this?

            I'm outputting TCX because it's a textual format so it's easier to interpolate and debug than a binary FIT format. Since I can gzip it for upload its size is OK as well when compressed.

            ...

            ANSWER

            Answered 2021-May-04 at 21:19

            It seems that TCX is too limited file format with respect to sport selection. I develop FIT file based upload and that is able to carry Kayaking and many more sports.

            Source https://stackoverflow.com/questions/66294405

            QUESTION

            Strava - How to detect pause in run/activity
            Asked 2021-Apr-19 at 14:32

            Is there a way to detect a user pausing a run/activity within the strava API?

            ...

            ANSWER

            Answered 2021-Apr-19 at 14:32

            With Get Activity Streams (getActivityStreams) you can obtain differents StreamSet from your activity: in order to detect pause I think you can analyze CadenceStream or MovingStream.

            Source https://stackoverflow.com/questions/67148954

            QUESTION

            Derive tile coordinates from tile number
            Asked 2021-Mar-29 at 05:41

            I feel like this question has been answered before, but I'm off track somehow. I have the URL of a tile (see below): I see that the zoom level is 6, the 33th tile towards the east and 20th tile towards the south. My question is, can I deduct the lat/long (web mercator) coordinates of this tile using said numbers (33 / 20)?

            https://heatmap-external-c.strava.com/tiles/all/hot/6/33/20@2x.png?v=19

            ...

            ANSWER

            Answered 2021-Mar-29 at 05:41

            As stated in the tags of the question, the linked map is rendered via mapbox GL. In the mapbox docs, I found a reference to the OSM Slippy Map Tilenames specification which in turn provides the method with which to transform tilenames to lat long coordinates and vice versa. The following pseudocode answers the question.

            Tile numbers (xtile, ytile) to lon./lat for a given zoom level (zoom)

            Source https://stackoverflow.com/questions/66807346

            QUESTION

            Strava Webhook API is not sending all events
            Asked 2021-Mar-23 at 18:56

            I created an app on Strava. Authorized my app on my account with read,activity:read,activity:read_all,read_all permissions.

            I didn't want polling their API for activities as they recommend webhooks for that.

            So I created a webhook subscription and validated it via the callback url.

            Here's the response of Strava API for the webhook subscriptions I successfully created:

            ...

            ANSWER

            Answered 2021-Mar-23 at 18:56

            Finally solved my problem and writing the solution here for other people. Probably the people who don't have this problem are using libraries for Strava in their coding languages which already obtain access_token and refresh_token after the authorization.

            If you're dealing with Strava Webhook API yourself like me, after the authorization, you must obtain your access_token and refresh_token as explained here https://developers.strava.com/docs/getting-started/#oauth

            Strava Webhook API documentation doesn't say anything about this because access_token is not needed for creating a webhook subscription. Strava API creates a subscription and returns a successful response. This is misleading because your endpoint won't get any webhook events

            Source https://stackoverflow.com/questions/65926051

            QUESTION

            How to show multiple sets of polylines in Flutter on one Google map
            Asked 2021-Feb-16 at 12:50

            I am trying to show multiple sets of different polylines (each set represents one cycling route with its own start and endpoint).

            There are ten routes in total I am bringing in from a JSON file. The problem is the map is consolidating all the individual ten routes into one mammoth polyline.

            So It is sort of connecting them all together (you can just make out the very straight line connecting between each route and only one startCap and endCap icon).

            I would expect/want to see ten different startCap and endCap icons and spaces between each polyline set.

            So how do I make the map show each polyline route as distinct routes?

            I am using flutter_polyline_points to decode the polyline route to the google map.

            Code below and the JSON is on the live link to make it easy to emulate if that helps.

            In essence in terms of steps :

            1. I create the google map and have one main central marker on it.

            2. I then bring in ten routes from a JSON file. These are ten objects in an array called Segments. Each object has a unique id I use for the PolyLineid and a unique polyline set of points in a string. So I bring in the JSON and then.

            3. iterate over each object and decode the polyline string to polyline coordinates which I attempt to then add to the map as multiple PolyLines.

            Also to here is the output I am seeing to bring the issue to life.

            ...

            ANSWER

            Answered 2021-Feb-16 at 11:55

            You have to create a list of object which contains lat long. Add polylines coordinates and markers into the list. As showing in the link.

            Source https://stackoverflow.com/questions/66223581

            QUESTION

            Is df.align() in pandas the optimal solution for inserting missing date rows, whilst preserving duplicate date rows
            Asked 2021-Feb-09 at 17:58

            My data is STRAVA activities in a dataframe with the index set as the date of the activity. I want to insert rows that are indexed with the date that is missing i.e. my dataframe would be indexed at a frequency of days from oldest to newest in the original data. I have tried the following methods from two other posts here Add missing dates to pandas dataframe and here pandas fill missing dates in time series

            However the issue I run into is as follows. Because on some dates two activities occur the index label for the row no longer is unique and is duplicated.

            ...

            ANSWER

            Answered 2021-Feb-09 at 17:58

            You could make your date series into a dataframe and to a left merge.

            Source https://stackoverflow.com/questions/66124010

            QUESTION

            How to troubleshoot oAuth authentication in asp.net core Blazor App
            Asked 2021-Jan-22 at 10:10

            I am trying to set up Strava authentication (which is plain oAuth2) in Asp.Net Core Blazor App. I am rather new to Blazor & Web dev (more of a backend background), and I don't seem to find out how to troubleshoot the reason why the Authentication does not work.

            When I click the oAuth login button on the Login page in the (default) Blazor Server App, I get redirected to the correct oAuth login screen (of Strava in my case), but after I successfully enter the credentials for that App, the login page shows an error Error loading external login information.

            While I would obviously appreciate any help or tips that could point out what is wrong in my code, I'm mostly searching for a way to get better error information and troubleshooting capabilities here. Setting a breakpoint in the EventHandler delegates does not show much.

            This is the Startup.cs extract where I have configured the authentication setup :

            ...

            ANSWER

            Answered 2021-Jan-22 at 10:10

            An update that made things work for me, so maybe it can help other people.

            I performed the following actions, in order to gain more control on the entire authentication process.

            1. I scaffolded two pages, in which I then could debug & step through (and obviously also update and change things). More information was found in this post:
              • Account.Login, which enables the customization of the actual login page dotnet aspnet-codegenerator identity -dc CotacolApp.Data.ApplicationDbContext --files "Account.Login"
              • Account.ExternalLogin, which enables the customization of the actual strava page dotnet aspnet-codegenerator identity -dc CotacolApp.Data.ApplicationDbContext --files "Account.ExternalLogin"
            2. I then found out that the var info = await _signInManager.GetExternalLoginInfoAsync(); always resulted in a null value. And that was because I had to set the IdentityScheme to external. ```
            3. And after that, I had to run some custom logic to do the claim mapping. Most of those details were written down in this stackoverflow post by @Morgeh.

            Hope this can help people in the future.

            Source https://stackoverflow.com/questions/65836375

            QUESTION

            Android Fragment argument bundle: getString returning null when key exists
            Asked 2021-Jan-17 at 20:15

            I am pretty confident I'm missing something simple here. Apologies in advance, I'm new to Android.

            So far my app sends a request to the Strava OAuth server, which returns to my app's implicit deep link via the callback URI I used in the request. I'm trying to get the 'code' and the 'scope' arguments that are passed with the callback URI passed to the fragment. The argument received is this, found via getArguments.

            ...

            ANSWER

            Answered 2021-Jan-17 at 20:15

            What I was missing was that the Bundle had a full Intent object inside of it. I had to query the Intent from the fragment's Activity with the code below:

            Source https://stackoverflow.com/questions/65764776

            QUESTION

            Android deep link for OAuth callback URI not working
            Asked 2021-Jan-11 at 02:15

            I'm trying to get an implicit deep link working in a very basic Android app. The goal is to demonstrate a basic OAuth flow with Strava's OAuth server to get access to their API.

            Strava automatically whitelists 'localhost' plus any authorization callback domain you enter when you register your 'app'. I'm relying on localhost.

            I have an activity plus some fragments. In Android Studio I've added a deep link to a fragment that isn't the initial one. My initial fragment asks for a login name and password then creates an IntentUri to hit the Strava OAuth server. This goes just fine and it passes the callback URI in the OAuth request along with the grant requests. The problem is that the callback URI does not go to the deep link.

            I've tried a few combinations for callback URIs:

            1. http://localhost/fibonacci/itemFragment
            2. localhost/fibonacci/itemFragment
            3. myapp://localhost/fibonacci/itemFragment

            None of these work (yes I always update the URI in the OAuth request and in xml that describes the deep link at the same time.

            1. the callback URI triggers a request to open the browser.
            2. the Strava site flags the callback uri as invalid.
            3. the callback doesn't seem to occur.

            I've also tried to test this by creating a shortcut but in each the browser tries to open the shortcut.
            Below are my android manifest file, my shortcuts.xml file and my nav_graph.xml.

            I should at least be able to get the shortcut to work even if Strava wouldn't work for whatever reason.

            Any help is appreciated.

            -------------------AndroidManifest.xml---------------------------------

            ...

            ANSWER

            Answered 2021-Jan-11 at 02:15

            You haven't registered your in your navigation graph in your manifest, so it will never be triggered by the Android OS.

            As per the implicit deep link documentation:

            To enable implicit deep linking, you must also make additions to your app's manifest.xml file. Add a single element to an activity that points to an existing navigation graph, as shown in the following example:

            Source https://stackoverflow.com/questions/65660468

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install strava

            To install the package, run:.

            Support

            Issues and pull requests are welcome.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i strava

          • CLONE
          • HTTPS

            https://github.com/rfoel/strava.git

          • CLI

            gh repo clone rfoel/strava

          • sshUrl

            git@github.com:rfoel/strava.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular REST Libraries

            public-apis

            by public-apis

            json-server

            by typicode

            iptv

            by iptv-org

            fastapi

            by tiangolo

            beego

            by beego

            Try Top Libraries by rfoel

            bulma-toast

            by rfoelJavaScript

            use-prefers-color-scheme

            by rfoelTypeScript

            drake-ipsum

            by rfoelJavaScript

            styled-content-loader

            by rfoelTypeScript

            futebol.io

            by rfoelJavaScript