Skip to content

Commit 17d637d

Browse files
committed
Add update logic for calendar events
1 parent f30f2d8 commit 17d637d

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

lib/upcoming_events/tasks/connpass.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ def run
1919
event_url: e['event_url'],
2020
event_at: Time.zone.parse(e['started_at']),
2121
event_end_at: Time.zone.parse(e['ended_at']),
22-
participants: e['accepted'])
22+
participants: e['accepted'],
23+
event_update_at: Time.zone.parse(e['updated_at']),
24+
address: e['address'],
25+
place: e['place'],
26+
limit: e['limit'])
2327
end
2428
end
2529
end

lib/upcoming_events/tasks/doorkeeper.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ def run
1919
event_url: e['public_url'],
2020
participants: e['participants'],
2121
event_at: Time.zone.parse(e['starts_at']),
22-
event_end_at: Time.zone.parse(e['ends_at']))
22+
event_end_at: Time.zone.parse(e['ends_at']),
23+
event_update_at: Time.zone.parse(e['updated_at']),
24+
address: e['address'],
25+
place: e['venue_name'],
26+
limit: e['ticket_limit'])
2327
end
2428
end
2529
end

spec/factories/upcoming_events.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
event_at { '2019-05-01 10:00'.in_time_zone }
1010
event_end_at { '2019-05-01 13:00'.in_time_zone }
1111
participants { 1 }
12+
event_update_at { '2019-05-01 09:00'.in_time_zone }
13+
address { '東京都新宿区高田馬場1丁目28−10' }
14+
place { 'CASE Shinjuku 三慶ビル 4階' }
15+
limit { 10 }
1216
end
1317
end
1418

0 commit comments

Comments
 (0)