Module: Mastodon::REST::ScheduledStatuses

Includes:
Utils
Included in:
API
Defined in:
lib/mastodon/rest/scheduled_statuses.rb

Instance Method Summary collapse

Methods included from Utils

#array_param, #perform_request, #perform_request_with_collection, #perform_request_with_object

Instance Method Details

#delete_scheduled_status(id) ⇒ Object

Cancel a scheduled status


38
39
40
# File 'lib/mastodon/rest/scheduled_statuses.rb', line 38

def delete_scheduled_status(id)
  perform_request(:delete, "/api/v1/scheduled_statuses/#{id}")
end

#scheduled_status(id) ⇒ Mastodon::ScheduledStatus

Retrieve a scheduled status


23
24
25
# File 'lib/mastodon/rest/scheduled_statuses.rb', line 23

def scheduled_status(id)
  perform_request_with_object(:get, "/api/v1/scheduled_statuses/#{id}", {}, Mastodon::ScheduledStatus)
end

#scheduled_statuses(options = {}) ⇒ Mastodon::Collection<Mastodon::ScheduledStatus>

Get a list of scheduled statuses

Options Hash (options):

  • :max_id (Integer)
  • :since_id (Integer)
  • :min_id (Integer)
  • :limit (Integer)

16
17
18
# File 'lib/mastodon/rest/scheduled_statuses.rb', line 16

def scheduled_statuses(options = {})
  perform_request_with_collection(:get, '/api/v1/scheduled_statuses', options, Mastodon::ScheduledStatus)
end

#update_scheduled_status(id, params = {}) ⇒ Mastodon::ScheduledStatus

Update a scheduled status

Options Hash (params):

  • :scheduled_at (String)

32
33
34
# File 'lib/mastodon/rest/scheduled_statuses.rb', line 32

def update_scheduled_status(id, params = {})
  perform_request_with_object(:put, "/api/v1/scheduled_statuses/#{id}", params, Mastodon::ScheduledStatus)
end