Class: Rafflesia::HomologyDatabaseReleases

Inherits:
Object
  • Object
show all
Defined in:
lib/rafflesia/homology_database_releases.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ HomologyDatabaseReleases

Returns a new instance of HomologyDatabaseReleases.



9
10
11
# File 'lib/rafflesia/homology_database_releases.rb', line 9

def initialize(client)
  @client = client
end

Instance Method Details

#list(database_id:, limit: 20, starting_after: nil, ending_before: nil, request_options: {}) ⇒ Rafflesia::EnvelopeHomologyDatabaseReleaseList

GET /v1/homology_databases/database_id/releases

Parameters:

  • database_id (String)
  • limit (Integer, nil) (defaults to: 20)
  • starting_after (String, nil) (defaults to: nil)
  • ending_before (String, nil) (defaults to: nil)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/rafflesia/homology_database_releases.rb', line 20

def list(
  database_id:,
  limit: 20,
  starting_after: nil,
  ending_before: nil,
  request_options: {}
)
  params = {
    'limit' => limit,
    'starting_after' => starting_after,
    'ending_before' => ending_before
  }.compact
  response = @client.request(
    method: :get,
    path: "/v1/homology_databases/#{Rafflesia::Util.encode_path(database_id)}/releases",
    auth: true,
    params: params,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeHomologyDatabaseReleaseList.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end