Class: Blockmason::Link::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/blockmason/link/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_url: ::Blockmason::Link::Provider.default_url, client_id:, client_secret:) ⇒ Project

Returns a new instance of Project.



8
9
10
11
12
# File 'lib/blockmason/link/project.rb', line 8

def initialize(base_url: ::Blockmason::Link::Provider.default_url, client_id:, client_secret:)
  @base_url = base_url
  @client_id = client_id
  @client_secret = client_secret
end

Instance Attribute Details

#base_urlObject

Returns the value of attribute base_url.



6
7
8
# File 'lib/blockmason/link/project.rb', line 6

def base_url
  @base_url
end

#client_idObject

Returns the value of attribute client_id.



6
7
8
# File 'lib/blockmason/link/project.rb', line 6

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



6
7
8
# File 'lib/blockmason/link/project.rb', line 6

def client_secret
  @client_secret
end

#connection=(value) ⇒ Object

Sets the attribute connection

Parameters:

  • value

    the value to set the attribute connection to.



6
7
8
# File 'lib/blockmason/link/project.rb', line 6

def connection=(value)
  @connection = value
end

#provider=(value) ⇒ Object

Sets the attribute provider

Parameters:

  • value

    the value to set the attribute provider to.



6
7
8
# File 'lib/blockmason/link/project.rb', line 6

def provider=(value)
  @provider = value
end

#session=(value) ⇒ Object

Sets the attribute session

Parameters:

  • value

    the value to set the attribute session to.



6
7
8
# File 'lib/blockmason/link/project.rb', line 6

def session=(value)
  @session = value
end

Instance Method Details

#get(path, inputs = {}) ⇒ Object



14
15
16
# File 'lib/blockmason/link/project.rb', line 14

def get(path, inputs = {})
  session.get(path, inputs)
end

#post(path, inputs = {}) ⇒ Object



18
19
20
# File 'lib/blockmason/link/project.rb', line 18

def post(path, inputs = {})
  session.post(path, inputs)
end