Class: Strava::Webhooks::Models::Event
- Inherits:
-
Hashie::Trash
- Object
- Hashie::Trash
- Strava::Webhooks::Models::Event
- Defined in:
- lib/strava/webhooks/models/event.rb
Overview
Represents a webhook event from Strava.
After successfully creating a webhook subscription, Strava will send POST requests to your callback URL when activity events occur. Events include activity creation, updates, and deletions.
Instance Method Summary collapse
-
#aspect_type ⇒ String
Type of event: "create", "update", or "delete".
-
#event_time ⇒ Time
Timestamp when the event occurred.
-
#id ⇒ Integer
ID of the object (activity ID, athlete ID, etc.).
-
#object_type ⇒ String
Type of object (e.g., "activity", "athlete").
-
#owner_id ⇒ Integer
Athlete ID who owns the object.
-
#subscription_id ⇒ Integer
ID of the webhook subscription.
-
#updates ⇒ Hash
Map of updated properties (only for update events).
Instance Method Details
#aspect_type ⇒ String
Returns Type of event: "create", "update", or "delete".
51 |
# File 'lib/strava/webhooks/models/event.rb', line 51 property 'aspect_type' |
#event_time ⇒ Time
Returns Timestamp when the event occurred.
63 |
# File 'lib/strava/webhooks/models/event.rb', line 63 property 'event_time', transform_with: ->(v) { Time.at(v) } |
#id ⇒ Integer
Returns ID of the object (activity ID, athlete ID, etc.).
48 |
# File 'lib/strava/webhooks/models/event.rb', line 48 property 'id', from: 'object_id' |
#object_type ⇒ String
Returns Type of object (e.g., "activity", "athlete").
45 |
# File 'lib/strava/webhooks/models/event.rb', line 45 property 'object_type' |
#owner_id ⇒ Integer
Returns Athlete ID who owns the object.
57 |
# File 'lib/strava/webhooks/models/event.rb', line 57 property 'owner_id' |
#subscription_id ⇒ Integer
Returns ID of the webhook subscription.
60 |
# File 'lib/strava/webhooks/models/event.rb', line 60 property 'subscription_id' |
#updates ⇒ Hash
Returns Map of updated properties (only for update events).
54 |
# File 'lib/strava/webhooks/models/event.rb', line 54 property 'updates' |