Module: Unloq::Activity

Included in:
Client
Defined in:
lib/unloq/activity.rb

Instance Method Summary collapse

Instance Method Details

#activity(author, limit: 10) ⇒ Object

Fetch activity for an author or author type

Parameters:

  • author (Unloq::Entity)

    The author for which to fetch activity.

  • limit (Integer) (defaults to: 10)

    The limit of number of records to return, defaults to 10.



9
10
11
12
13
# File 'lib/unloq/activity.rb', line 9

def activity author, limit: 10
  validate_author(author)

  get('/activity', "/#{author.type}/#{author.id}", additional_options: { limit: limit })
end