Class: Posthubify::QueueSchedulesResource
- Inherits:
-
Object
- Object
- Posthubify::QueueSchedulesResource
- Defined in:
- lib/posthubify/resources/platform.rb
Overview
Publishing queue schedules (Node sdk .queue.schedules).
Instance Method Summary collapse
-
#create(input) ⇒ Object
Create a new schedule pattern.
-
#delete(id) ⇒ Object
Delete a schedule pattern.
-
#initialize(http) ⇒ QueueSchedulesResource
constructor
A new instance of QueueSchedulesResource.
-
#list ⇒ Object
List schedule patterns.
-
#reshuffle(id) ⇒ Object
Re-spread the queue when the pattern changes (only add-to-queue posts are moved).
-
#update(id, input) ⇒ Object
Update a schedule pattern.
Constructor Details
#initialize(http) ⇒ QueueSchedulesResource
Returns a new instance of QueueSchedulesResource.
65 66 67 |
# File 'lib/posthubify/resources/platform.rb', line 65 def initialize(http) @http = http end |
Instance Method Details
#create(input) ⇒ Object
Create a new schedule pattern.
75 76 77 |
# File 'lib/posthubify/resources/platform.rb', line 75 def create(input) @http.data('POST', '/queue/schedules', body: input) end |
#delete(id) ⇒ Object
Delete a schedule pattern.
85 86 87 |
# File 'lib/posthubify/resources/platform.rb', line 85 def delete(id) @http.data('DELETE', "/queue/schedules/#{id}") end |
#list ⇒ Object
List schedule patterns.
70 71 72 |
# File 'lib/posthubify/resources/platform.rb', line 70 def list @http.data('GET', '/queue/schedules') end |
#reshuffle(id) ⇒ Object
Re-spread the queue when the pattern changes (only add-to-queue posts are moved).
90 91 92 |
# File 'lib/posthubify/resources/platform.rb', line 90 def reshuffle(id) @http.data('POST', "/queue/schedules/#{id}/reshuffle") end |
#update(id, input) ⇒ Object
Update a schedule pattern.
80 81 82 |
# File 'lib/posthubify/resources/platform.rb', line 80 def update(id, input) @http.data('PATCH', "/queue/schedules/#{id}", body: input) end |