Class: Flydata::Api::DataPort

Inherits:
Base
  • Object
show all
Defined in:
lib/flydata/api/data_port.rb

Instance Method Summary collapse

Methods inherited from Base

#create, #list

Constructor Details

#initialize(api_client) ⇒ DataPort

Returns a new instance of DataPort.


6
7
8
9
10
# File 'lib/flydata/api/data_port.rb', line 6

def initialize(api_client)
  @model_name = 'data_port'
  @url_path = "/#{@model_name.pluralize}"
  super
end

Instance Method Details

#getObject


11
12
13
14
# File 'lib/flydata/api/data_port.rb', line 11

def get
  # currently one user has one data port
  self.list.first
end

#redshift_table_listObject


15
16
17
18
# File 'lib/flydata/api/data_port.rb', line 15

def redshift_table_list
  url_path = "#{@url_path}/redshift_table_list"
  @client.get(url_path)
end