-
Freezed authored
Define options Options not passed as argument are prompted; - if required - and default value not set TODO: Response not correctly formated for status and error Status: N/A Error: N/A
Freezed authoredDefine options Options not passed as argument are prompted; - if required - and default value not set TODO: Response not correctly formated for status and error Status: N/A Error: N/A
api.py 323 B
"""
API utilities
"""
from requests import HTTPError
from strava.api._helpers import client, url, json
def post_activity(xargs):
"""API call to create an activity"""
response = client.post(url=url("/activities"), data=xargs)
try:
return json(response)
except HTTPError:
return response