Class: Rafflesia::OntologyPaths
- Inherits:
-
Object
- Object
- Rafflesia::OntologyPaths
- Defined in:
- lib/rafflesia/ontology_paths.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ OntologyPaths
constructor
A new instance of OntologyPaths.
-
#list(from_relation:, to_relation:, from_database:, from_release:, to_database:, to_release:, safety: 'strict', max_hops: 0, limit: 10, starting_after: nil, bridge: nil, source: nil, evidence: 'declared', auto_resolve_bridges: true, ontology_digest: nil, request_options: {}) ⇒ Rafflesia::EnvelopeOntologyPathListData
GET /v1/ontology_paths.
Constructor Details
#initialize(client) ⇒ OntologyPaths
Returns a new instance of OntologyPaths.
9 10 11 |
# File 'lib/rafflesia/ontology_paths.rb', line 9 def initialize(client) @client = client end |
Instance Method Details
#list(from_relation:, to_relation:, from_database:, from_release:, to_database:, to_release:, safety: 'strict', max_hops: 0, limit: 10, starting_after: nil, bridge: nil, source: nil, evidence: 'declared', auto_resolve_bridges: true, ontology_digest: nil, request_options: {}) ⇒ Rafflesia::EnvelopeOntologyPathListData
GET /v1/ontology_paths
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/rafflesia/ontology_paths.rb', line 31 def list( from_relation:, to_relation:, from_database:, from_release:, to_database:, to_release:, safety: 'strict', max_hops: 0, limit: 10, starting_after: nil, bridge: nil, source: nil, evidence: 'declared', auto_resolve_bridges: true, ontology_digest: nil, request_options: {} ) params = { 'from_relation' => from_relation, 'to_relation' => to_relation, 'safety' => safety, 'max_hops' => max_hops, 'limit' => limit, 'starting_after' => starting_after, 'from_database' => from_database, 'from_release' => from_release, 'to_database' => to_database, 'to_release' => to_release, 'bridge' => bridge, 'source' => source, 'evidence' => evidence, 'auto_resolve_bridges' => auto_resolve_bridges, 'ontology_digest' => ontology_digest }.compact response = @client.request( method: :get, path: '/v1/ontology_paths', auth: true, params: params, request_options: ) result = Rafflesia::EnvelopeOntologyPathListData.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 |