Method: Ayadn::Endpoints#posts

Defined in:
lib/ayadn/endpoints.rb

#posts(username, options) ⇒ Object



115
116
117
118
119
120
121
122
123
124
# File 'lib/ayadn/endpoints.rb', line 115

def posts(username, options)
  make_options_list_simple(options) do
    API.build_query({count: Settings.options.counts.posts})
  end
  if Settings.global.force
    "#{@users_url}#{username}/posts/?#{@options_list}"
  else
    "#{@users_url}#{username}/posts/?access_token=#{Settings.user_token}#{@options_list}"
  end
end