问题标签 [mapmyfitness]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
575 浏览

swift - Error 403 on MapMyFitness API request

i'n trying to do some request on the MapMyFitness API (Oauth2).

I can get my Authorization Code with the oauth2 identification, but now i need to request to some route.

Here is the request :

In the header here is the authorization code like this :

Here is the doc about the route API : https://developer.underarmour.com/docs/v71_Workout

Alamofire error:

responseValidationFailed(Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(403))

Am i missing something ? Thx

0 投票
1 回答
493 浏览

swift3 - 使用 Swift 3 的 MapMyRun 的 OAuth2

我试图让用户验证我的应用程序以使用他存储在 MapMyRun(https://developer.underarmour.com/apps/myapps)上的数据。

这是我的代码:

我的输出:

到目前为止,我得到的是正确的重定向

但 OAuth2 不处理这个。

如何使其通过 MapMyRun 进行身份验证?我的想法是为例如实施深层链接。register://,这里将是所有回调数据。这将由下一个帖子请求处理,该请求将为我们提供访问令牌。但这对我来说听起来有点复杂。

有没有其他方法可以解决它?

我正在尝试重写我的 python 代码,它工作得很好,但现在我需要把它放在我的 iOS 应用程序上:D

https://developer.underarmour.com/docs/v71_OAuth_2_Demo

谢谢!

抄送:@Makaille

0 投票
1 回答
216 浏览

swift3 - 简单的活动跟踪器 Swift 代码

我是使用 swift 代码编程的新手,希望有人可以帮助我完成我的项目。

我想创建一个记录用户时间和距离的活动跟踪器。总体而言,从伦敦到澳大利亚的总距离(比如 200,000 公里)要经过几个国家。

每次用户记录一个活动时,总数会减去用户记录的数量,直到总数为零。

其次,我想在地图上显示整体进度并记录从开始的进度。

我从网上的一个教程开始,这似乎是一个好的开始。但我不知道如何记录距离和时间,然后做上面的位

任何帮助将不胜感激。

亲切的问候,

0 投票
1 回答
192 浏览

android - 如何查询google fit api的营养

我已将 myfitnesspal 帐户链接到 google,并在数据源列表中查看 dataStreamId,但是,当我使用 google 中的 oAuth 2.0 游乐场构建查询并尝试使用以下方法进行查询时:

https://www.googleapis.com/fitness/v1/users/me/dataSources/raw:com.google.nutrition:com.myfitnesspal.android:food_item/datasets/1534723200000000000-1534982399000000000

我得到以下信息: