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.



4
5
6
7
8
# File 'lib/flydata/api/data_port.rb', line 4

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

Instance Method Details

#getObject



9
10
11
12
# File 'lib/flydata/api/data_port.rb', line 9

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

#redshift_table_listObject



13
14
15
16
# File 'lib/flydata/api/data_port.rb', line 13

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