Class: Instagramp::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/instagramp/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#app_secretObject

Returns the value of attribute app_secret.



5
6
7
# File 'lib/instagramp/config.rb', line 5

def app_secret
  @app_secret
end

#client_idObject

Returns the value of attribute client_id.



5
6
7
# File 'lib/instagramp/config.rb', line 5

def client_id
  @client_id
end

#redirect_uriObject

Returns the value of attribute redirect_uri.



5
6
7
# File 'lib/instagramp/config.rb', line 5

def redirect_uri
  @redirect_uri
end

#scopeObject

Returns the value of attribute scope.



5
6
7
# File 'lib/instagramp/config.rb', line 5

def scope
  @scope
end

Class Method Details

.config {|conf| ... } ⇒ Object

Yields:

  • (conf)


7
8
9
10
11
12
# File 'lib/instagramp/config.rb', line 7

def self.config
  conf    = Config.new
  conf.scope = 'email,public_profile,pages_show_list,instagram_basic,instagram_content_publish,pages_show_list'
  yield conf
  {client_id: conf.client_id, app_secret: conf.app_secret, redirect_uri: conf.redirect_uri, scope: conf.scope}
end