class Instagram::Post::Ids
Public Class Methods
accounts(config, token)
click to toggle source
# File lib/instagram/post/ids.rb, line 25 def self.accounts(config, token) new(config, token).accounts end
new(config, token)
click to toggle source
# File lib/instagram/post/ids.rb, line 9 def initialize(config, token) @config = config @token = token end
Public Instance Methods
accounts()
click to toggle source
# File lib/instagram/post/ids.rb, line 14 def accounts ids = [] accounts = HTTParty.get("#{Instagram::Post::LINKACCOUNTS}access_token=#{@token}") get_id_ig_instagram = JSON.parse(accounts.body)["data"] get_id_ig_instagram.each do |ig| ids.push ig["id"] end ids end