Module: Vk::DSL::Wall

Included in:
Vk::DSL
Defined in:
lib/vk/dsl/wall.rb

Instance Method Summary collapse

Instance Method Details

#get_wall(user_id, options = {}) ⇒ Array<Fixnum, *Hash>

Statuses from user’s wall

Parameters:

  • user_id (Fixnum)

    user identifier

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

Options Hash (options):

  • :count (Fixnum)

    how many statuses to request

  • :offset (Fixnum)

    offset of statuses to request

  • :filter (:owner, :others, :all) — default: :all

    what kind of statuses to request

Returns:

  • (Array<Fixnum, *Hash>)

    count of statuses and each status in hash



13
14
15
16
17
# File 'lib/vk/dsl/wall.rb', line 13

def get_wall(user_id, options = {})
  options[:filter] ||= :all
  options[:owner_id] = user_id
  Vk::Result.new('groups.get', Vk::Post, options)
end

#get_wall_statuses(posts) ⇒ Object



19
20
21
# File 'lib/vk/dsl/wall.rb', line 19

def get_wall_statuses(posts)
  request('wall.getById', posts: posts)
end