done runkeeper
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# All the functionality needed to connect to Runkeeper
|
||||
from rowers.imports import *
|
||||
import re
|
||||
|
||||
from rowsandall_app.settings import (
|
||||
C2_CLIENT_ID, C2_REDIRECT_URI, C2_CLIENT_SECRET,
|
||||
@@ -225,8 +226,10 @@ def createrunkeeperworkoutdata(w):
|
||||
# upload
|
||||
def getidfromresponse(response):
|
||||
uri = response.headers["Location"]
|
||||
id = uri[len(uri)-9:]
|
||||
|
||||
|
||||
tester = re.compile('^\/fitnessActivities\/(\d+)$')
|
||||
id = int(tester.match(uri).group(1))
|
||||
|
||||
return int(id)
|
||||
|
||||
def geturifromid(access_token,id):
|
||||
|
||||
Reference in New Issue
Block a user