Skip to content

Commit 77f64ff

Browse files
authored
Drops supported endpoint/method to retrieve photos explicitly (#77)
* drops method for getting photos explicitly * adds documentation for upgrading * fix up changelog wording * fixes wording
1 parent 45f4e79 commit 77f64ff

File tree

5 files changed

+2
-71
lines changed

5 files changed

+2
-71
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### 2.0.0 (Next)
22

3+
* [#77](https://github.com/dblock/strava-ruby-client/pull/77): Drops unsupported endpoint/method `activity_photos` - [@simonneutert](https://github.com/simonneutert).
34
* [#62](https://github.com/dblock/strava-ruby-client/pull/68): Drops `Activity#type` attribute as it is being deprecated by Strava, dropping `Activity#type_emoji` with it - [@simonneutert](https://github.com/simonneutert).
45
* [#23](https://github.com/dblock/strava-ruby-client/pull/23): Failed uploads raise Strava::Errors::UploadError - [@ylecuyer](https://github.com/ylecuyer), [@simonneutert](https://github.com/simonneutert).
56
* [#69](https://github.com/dblock/strava-ruby-client/pull/69): Raises `Strava::Api::RatelimitError`, when API ratelimit exceeded - [@simonneutert](https://github.com/simonneutert).

README.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Unlike other clients, including [strava-api-v3](https://github.com/jaredholdcrof
1414
- [Activities](#activities)
1515
- [Create an Activity](#create-an-activity)
1616
- [Get Activity](#get-activity)
17-
- [List Activity Photos](#list-activity-photos)
1817
- [List Activity Comments](#list-activity-comments)
1918
- [List Activity Kudoers](#list-activity-kudoers)
2019
- [List Activity Laps](#list-activity-laps)
@@ -150,29 +149,6 @@ google_image_url = "https://maps.googleapis.com/maps/api/staticmap?maptype=roadm
150149

151150
See [Strava::Models::Map](lib/strava/models/map.rb) for all available properties.
152151

153-
#### List Activity Photos
154-
155-
Returns the photos on the given activity. This API is undocumented.
156-
157-
```ruby
158-
photos = client.activity_photos(1982980795) # => Array[Strava::Models::Photo]
159-
160-
photo = photos.first # => Strava::Models::Photo
161-
162-
photo.id # => nil
163-
photo.unique_id # => '65889142-538D-4EE5-96F5-3DC3B773B1E3'
164-
photo.urls # => { '0' => 'https://dgtzuqphqg23d.cloudfront.net/eb4DMJ2hJW3k_g9URZEMfaJ8rZfHagrNlZRuEZz0osU-29x64.jpg' }
165-
photo.athlete_id # => 26_462_176
166-
photo.activity_id # => 1_946_417_534
167-
photo.activity_name # => 'TCS NYC Marathon 2018'
168-
photo.created_at # => Time
169-
photo.uploaded_at # => Time
170-
photo.sizes # => { '0' => [29, 64] }
171-
photo.default_photo # => false
172-
```
173-
174-
See [Strava::Models::Photo](lib/strava/models/photo.rb) for all available properties.
175-
176152
#### List Activity Comments
177153

178154
Returns the comments on the given activity.

UPGRADING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Dropping `Activity` attribute `type` and `type_emoji` in favor of `sport_type` and `sport_type_emoji`. Creating or updating an `Activity` requires you to use `sport_type` instead of `type`, as refered in the [README](README.md#create-an-activity). For details visit the official [Strava docs: Create Activity](https://developers.strava.com/docs/reference/#api-Activities-createActivity) and the entry from June 15, 2022 in [Strava's V3 API Changelog](https://developers.strava.com/docs/changelog/).
66
- Uploading a file using `create_upload` requires you to check its process, using `client.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 raise `Strava::Errors::UploadError`, if Strava failed processing the file, e.g. it being a duplicate.
77
- Exceeded Ratelimits (HTTP Status: 429) do now raise a customized Error `Strava::Errors::RatelimitError`. You can use the `Strava::Api::Ratelimit` object coming with the error, for further inspection of your current ratelimits.
8+
- 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](https://github.com/dblock/strava-ruby-client/issues/76) for details.
89

910
### Upgrading to >= 1.0.0
1011

lib/strava/api/endpoints/activities.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,6 @@ def activity_comments(id_or_options, options = {}, &block)
3737
paginate "activities/#{id}/comments", options, Strava::Models::Comment, &block
3838
end
3939

40-
#
41-
# List activity photos.
42-
#
43-
# @option options [String] :id
44-
# Activity id.
45-
# @option options [Integer] :page
46-
# Page number.
47-
# @option options [Integer] :per_page
48-
# Number of items per page. Defaults to 30.
49-
#
50-
def activity_photos(id_or_options, options = {}, &block)
51-
id, options = parse_args(id_or_options, options)
52-
paginate "activities/#{id}/photos", options, Strava::Models::Photo, &block
53-
end
54-
5540
#
5641
# List activity kudoers.
5742
#

spec/strava/api/client/endpoints/activities/activity_photos_spec.rb

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)