Class: InstaScraper::JSON::AccountMedia

Inherits:
InstaScraper::JSON show all
Defined in:
lib/insta_scraper/json/account_media.rb

Instance Attribute Summary collapse

Attributes inherited from InstaScraper::JSON

#response

Instance Method Summary collapse

Methods inherited from InstaScraper::JSON

#data, #raw_json

Constructor Details

#initialize(username, params = {}) ⇒ AccountMedia

Returns a new instance of AccountMedia.



6
7
8
9
# File 'lib/insta_scraper/json/account_media.rb', line 6

def initialize(username, params = {})
  @username = username
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



3
4
5
# File 'lib/insta_scraper/json/account_media.rb', line 3

def params
  @params
end

#usernameObject (readonly)

Returns the value of attribute username.



3
4
5
# File 'lib/insta_scraper/json/account_media.rb', line 3

def username
  @username
end

Instance Method Details

#urlObject



11
12
13
# File 'lib/insta_scraper/json/account_media.rb', line 11

def url
  "https://www.instagram.com/#{username}/media/#{serialize_params}"
end