Support for Ruby 2.x has been dropped. The minimum required Ruby version is now 3.0.0.
The change in #80 removes default values for Faraday's SSL settings ca_file
and ca_path
.
If you previously relied on OpenSSL::X509::DEFAULT_CERT_FILE
or OpenSSL::X509::DEFAULT_CERT_DIR
to set these values, you must now do so explicitly.
Strava::Web::Client.configure do |config|
config.ca_file = OpenSSL::X509::DEFAULT_CERT_FILE
config.ca_path = OpenSSL::X509::DEFAULT_CERT_DIR
end
or
client = Strava::Api::Client.new(ca_file: OpenSSL::X509::DEFAULT_CERT_FILE, ca_path: OpenSSL::X509::DEFAULT_CERT_DIR)
- Dropping
Activity
attributetype
andtype_emoji
in favor ofsport_type
andsport_type_emoji
. Creating or updating anActivity
requires you to usesport_type
instead oftype
, as refered in the README. For details visit the official Strava docs: Create Activity and the entry from June 15, 2022 in Strava's V3 API Changelog. - Uploading a file using
create_upload
requires you to check its process, usingclient.updload('your-unique-upload-id')
. A successful upload does just mean, that the file was accepted. The Processing of the file is an independent process on Strava's side. From now on,client.updload('your-unique-upload-id')
will raiseStrava::Errors::UploadError
, if Strava failed processing the file, e.g. it being a duplicate. - Exceeded Ratelimits (HTTP Status: 429) do now raise a customized Error
Strava::Errors::RatelimitError
. You can use theStrava::Api::Ratelimit
object coming with the error, for further inspection of your current ratelimits. - The method
Client#activity_photos
to retrieve an activity's photos has been removed. The Strava API offers no official support for this. See #76 for details. - The method
Client#activity_photos
to retrieve an activity's photos has been added back. The Strava API does actually offer undocumented support for this. It's just finicky. See this discussion for details.
- API request will now raise
Strava::Web::RaiseResponseError
instead of::Strava::Web::Response::RaiseError
- Using
get
,post
,put
,delete
directly, changed fromFaraday::Response
toStrava::Web::Response
as return value.
In order to access theFaraday::Reponse
orFaraday::Reponse#body
you need to call.response
or.response.body
. - Paginated API paths now return
Strava::Api::Pagination
, which is a new wrapper class for the returned collection of entries.
The library was upgraded to require Faraday 1.0 or newer. Change all references to Faraday::Error::ResourceNotFound
or Faraday::Error::ConnectionFailed
to Faraday::ConnectionFailed
and Faraday::ResourceNotFound
respectively.
See #30 for more details.