Class: Broadcast::Resources::Broadcasts
- Inherits:
-
Base
- Object
- Base
- Broadcast::Resources::Broadcasts
show all
- Defined in:
- lib/broadcast/resources/broadcasts.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#cancel_schedule(id) ⇒ Object
37
38
39
|
# File 'lib/broadcast/resources/broadcasts.rb', line 37
def cancel_schedule(id)
post("/api/v1/broadcasts/#{id}/cancel_schedule")
end
|
#create(**attrs) ⇒ Object
14
15
16
|
# File 'lib/broadcast/resources/broadcasts.rb', line 14
def create(**attrs)
post('/api/v1/broadcasts', attrs)
end
|
#delete(id) ⇒ Object
22
23
24
|
# File 'lib/broadcast/resources/broadcasts.rb', line 22
def delete(id)
@client.request(:delete, "/api/v1/broadcasts/#{id}")
end
|
#get_broadcast(id) ⇒ Object
10
11
12
|
# File 'lib/broadcast/resources/broadcasts.rb', line 10
def get_broadcast(id)
get("/api/v1/broadcasts/#{id}")
end
|
#list(**params) ⇒ Object
6
7
8
|
# File 'lib/broadcast/resources/broadcasts.rb', line 6
def list(**params)
get('/api/v1/broadcasts', params)
end
|
#schedule(id, scheduled_send_at:, scheduled_timezone:) ⇒ Object
30
31
32
33
34
35
|
# File 'lib/broadcast/resources/broadcasts.rb', line 30
def schedule(id, scheduled_send_at:, scheduled_timezone:)
post("/api/v1/broadcasts/#{id}/schedule_broadcast", {
scheduled_send_at: scheduled_send_at,
scheduled_timezone: scheduled_timezone
})
end
|
#send_broadcast(id) ⇒ Object
26
27
28
|
# File 'lib/broadcast/resources/broadcasts.rb', line 26
def send_broadcast(id)
post("/api/v1/broadcasts/#{id}/send_broadcast")
end
|
#statistics(id) ⇒ Object
41
42
43
|
# File 'lib/broadcast/resources/broadcasts.rb', line 41
def statistics(id)
get("/api/v1/broadcasts/#{id}/statistics")
end
|
#statistics_links(id, **params) ⇒ Object
49
50
51
|
# File 'lib/broadcast/resources/broadcasts.rb', line 49
def statistics_links(id, **params)
get("/api/v1/broadcasts/#{id}/statistics/links", params)
end
|
#statistics_timeline(id, **params) ⇒ Object
45
46
47
|
# File 'lib/broadcast/resources/broadcasts.rb', line 45
def statistics_timeline(id, **params)
get("/api/v1/broadcasts/#{id}/statistics/timeline", params)
end
|
#update(id, **attrs) ⇒ Object
18
19
20
|
# File 'lib/broadcast/resources/broadcasts.rb', line 18
def update(id, **attrs)
patch("/api/v1/broadcasts/#{id}", attrs)
end
|