Module: Mastodon::REST::Timelines

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

Instance Method Summary collapse

Methods included from Utils

#array_param, #perform_request, #perform_request_with_collection, #perform_request_with_object

Instance Method Details

#home_timeline(options = {}) ⇒ Mastodon::Collection<Mastodon::Status>

Retrieve statuses from the home timeline

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

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

Returns:



15
16
17
# File 'lib/mastodon/rest/timelines.rb', line 15

def home_timeline(options = {})
  perform_request_with_collection(:get, '/api/v1/statuses/home', options, Mastodon::Status)
end

#mentions_timeline(options = {}) ⇒ Mastodon::Collection<Mastodon::Status>

Retrieve statuses from the mentions timeline

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

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

Returns:



25
26
27
# File 'lib/mastodon/rest/timelines.rb', line 25

def mentions_timeline(options = {})
  perform_request_with_collection(:get, '/api/v1/statuses/mentions', options, Mastodon::Status)
end

#public_timeline(options = {}) ⇒ Mastodon::Collection<Mastodon::Status>

Retrieve statuses from the public timeline

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

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

Returns:



35
36
37
# File 'lib/mastodon/rest/timelines.rb', line 35

def public_timeline(options = {})
  perform_request_with_collection(:get, '/api/v1/statuses/public', options, Mastodon::Status)
end