From 3b6b532db61fe849e3fda70fe834ca8c1afc3960 Mon Sep 17 00:00:00 2001 From: James Cowlishaw Date: Thu, 19 Dec 2019 15:41:57 +0000 Subject: [PATCH 1/2] Correct the API endpoints, as there is now a redirect, which returns the relative URL with the '/' appended. The redirect is not handled well by OAuth gem at the moment (pull request made). --- lib/mmf.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mmf.rb b/lib/mmf.rb index 1f6f9c2..1424da6 100644 --- a/lib/mmf.rb +++ b/lib/mmf.rb @@ -9,7 +9,7 @@ class Mmf::Client VAR = /%\{(.*?)\}/ API_MAP = { # user resources - me: { method: :get, endpoint: 'v7.0/user/self' }, + me: { method: :get, endpoint: 'v7.0/user/self/' }, deactivate: { method: :post, endpoint: 'v7.0/user_deactivation', }, user: { method: :get, endpoint: 'v7.0/user/%{user_id}', defaults: { user_id: :me } }, create_user: { method: :post, endpoint: 'v7.0/user' }, @@ -35,8 +35,8 @@ class Mmf::Client privacy_option: { method: :get, endpoint: 'v7.0/privacy_option/%{privacy_option_id}' }, # workout resources - add_workout: { method: :post, endpoint: 'v7.0/workout', required: [:activity_type, :name, :start_datetime, :start_locale_timezone] }, - workouts: { method: :get, endpoint: 'v7.0/workout', required: [:user], defaults: { user: :me } }, + add_workout: { method: :post, endpoint: 'v7.0/workout/', required: [:activity_type, :name, :start_datetime, :start_locale_timezone] }, + workouts: { method: :get, endpoint: 'v7.0/workout/', required: [:user], defaults: { user: :me } }, workout: { method: :get, endpoint: 'v7.0/workout/%{workout_id}' }, # course resources From 877f35ddbf62ba37a5198c7add2a53137b915aec Mon Sep 17 00:00:00 2001 From: James Cowlishaw Date: Tue, 12 Aug 2025 17:41:47 +0100 Subject: [PATCH 2/2] Update domain for MapMyFitness API. --- lib/mmf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mmf.rb b/lib/mmf.rb index 1424da6..c2c160c 100644 --- a/lib/mmf.rb +++ b/lib/mmf.rb @@ -4,7 +4,7 @@ require 'pp' class Mmf::Client - ROOT_URI = "https://oauth2-api.mapmyapi.com/" + ROOT_URI = "https://api.mapmyfitness.com" VAR = /%\{(.*?)\}/ API_MAP = {