Class: Rafflesia::Annotations
- Inherits:
-
Object
- Object
- Rafflesia::Annotations
- Defined in:
- lib/rafflesia/annotations.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Annotations
constructor
A new instance of Annotations.
-
#mappingsImport(database:, mapping_family:, release:, auxiliary_input_object_id: nil, auxiliary_path: nil, batch_rows: nil, checkpoint_path: nil, format: nil, input_object_id: nil, output_dir: nil, path: nil, relation: nil, resume: nil, source_doi: nil, source_layout: nil, source_record_id: nil, source_url: nil, timeout_ms: nil, request_options: {}) ⇒ Rafflesia::EnvelopeRelationImportData
POST /v1/annotations/mappings/import.
-
#mappingsMap(from_id:, to_ref:, allow_network: nil, sources: nil, request_options: {}) ⇒ Rafflesia::EnvelopeAnnotationMapData
POST /v1/annotations/mappings/map.
-
#sourcesFetch(allow_network: nil, ids: nil, sources: nil, target_id: nil, request_options: {}) ⇒ Rafflesia::EnvelopeAnnotationFetchData
POST /v1/annotations/sources/fetch.
Constructor Details
#initialize(client) ⇒ Annotations
Returns a new instance of Annotations.
9 10 11 |
# File 'lib/rafflesia/annotations.rb', line 9 def initialize(client) @client = client end |
Instance Method Details
#mappingsImport(database:, mapping_family:, release:, auxiliary_input_object_id: nil, auxiliary_path: nil, batch_rows: nil, checkpoint_path: nil, format: nil, input_object_id: nil, output_dir: nil, path: nil, relation: nil, resume: nil, source_doi: nil, source_layout: nil, source_record_id: nil, source_url: nil, timeout_ms: nil, request_options: {}) ⇒ Rafflesia::EnvelopeRelationImportData
POST /v1/annotations/mappings/import
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 77 78 79 80 81 82 83 84 85 |
# File 'lib/rafflesia/annotations.rb', line 34 def mappingsImport( database:, mapping_family:, release:, auxiliary_input_object_id: nil, auxiliary_path: nil, batch_rows: nil, checkpoint_path: nil, format: nil, input_object_id: nil, output_dir: nil, path: nil, relation: nil, resume: nil, source_doi: nil, source_layout: nil, source_record_id: nil, source_url: nil, timeout_ms: nil, request_options: {} ) body = { 'auxiliary_input_object_id' => auxiliary_input_object_id, 'auxiliary_path' => auxiliary_path, 'batch_rows' => batch_rows, 'checkpoint_path' => checkpoint_path, 'database' => database, 'format' => format, 'input_object_id' => input_object_id, 'mapping_family' => mapping_family, 'output_dir' => output_dir, 'path' => path, 'relation' => relation, 'release' => release, 'resume' => resume, 'source_doi' => source_doi, 'source_layout' => source_layout, 'source_record_id' => source_record_id, 'source_url' => source_url, 'timeout_ms' => timeout_ms }.compact response = @client.request( method: :post, path: '/v1/annotations/mappings/import', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeRelationImportData.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 |
#mappingsMap(from_id:, to_ref:, allow_network: nil, sources: nil, request_options: {}) ⇒ Rafflesia::EnvelopeAnnotationMapData
POST /v1/annotations/mappings/map
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/rafflesia/annotations.rb', line 94 def mappingsMap( from_id:, to_ref:, allow_network: nil, sources: nil, request_options: {} ) body = { 'allow_network' => allow_network, 'from_id' => from_id, 'sources' => sources, 'to_ref' => to_ref }.compact response = @client.request( method: :post, path: '/v1/annotations/mappings/map', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeAnnotationMapData.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 |
#sourcesFetch(allow_network: nil, ids: nil, sources: nil, target_id: nil, request_options: {}) ⇒ Rafflesia::EnvelopeAnnotationFetchData
POST /v1/annotations/sources/fetch
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/rafflesia/annotations.rb', line 126 def sourcesFetch( allow_network: nil, ids: nil, sources: nil, target_id: nil, request_options: {} ) body = { 'allow_network' => allow_network, 'ids' => ids, 'sources' => sources, 'target_id' => target_id }.compact response = @client.request( method: :post, path: '/v1/annotations/sources/fetch', auth: true, body: body, request_options: ) result = Rafflesia::EnvelopeAnnotationFetchData.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 |