stravalib.client.ActivityUploader#
- class stravalib.client.ActivityUploader(client: Client, response: dict[str, Any], raise_exc: bool = True)[source]#
The āfutureā object that holds information about an activity file upload and can wait for upload to finish, etc.
- __init__(client: Client, response: dict[str, Any], raise_exc: bool = True) None [source]#
- client: stravalib.client.Client
The
stravalib.client.Client
object that is handling the upload.- response: Dict[str,Any]
The initial upload response.
- raise_exc: bool
Whether to raise an exception if the response indicates an error state. (default True)
Methods
__init__
(client,Ā response[,Ā raise_exc])client: stravalib.client.Client
poll
()Update internal state from polling strava.com.
raise_for_error
()update_from_response
(response[,Ā raise_exc])Updates internal state of object.
upload_photo
(photo[,Ā timeout])Uploads a photo to the activity.
wait
([timeout,Ā poll_interval])Wait for the upload to complete or to err out.
Attributes
is_complete
is_error
is_processing
photo_metadata
photo metadata for the activity upload response, if any.