Class: Exa::Services::Websets::ListImports

Inherits:
Object
  • Object
show all
Defined in:
lib/exa/services/websets/import_list.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection, **params) ⇒ ListImports

Returns a new instance of ListImports.



7
8
9
10
# File 'lib/exa/services/websets/import_list.rb', line 7

def initialize(connection, **params)
  @connection = connection
  @params = params
end

Instance Method Details

#callObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/exa/services/websets/import_list.rb', line 12

def call
  response = @connection.get("/websets/v0/imports", @params)
  body = response.body

  Resources::ImportCollection.new(
    data: body["data"],
    has_more: body["hasMore"],
    next_cursor: body["nextCursor"]
  )
end