discovery-connect

Crates.iodiscovery-connect
lib.rsdiscovery-connect
created_at2024-03-27 13:23:49.653941
updated_at2024-03-27 13:23:49.653941
downloads0
descriptionLibrary to upload data to RetinAI Discovery via the public API.
homepagehttps://retinai.com
repositoryhttps://gitlab.com/ikerian/open-source/discovery-connect/
max_upload_size
id1187946

documentation

https://gitlab.com/ikerian/open-source/discovery-connect/-/blob/main/rust/README.md

README

# Discovery Connect (Rust) Rust interface for data exchange via the Discovery API, with C-compatible bindings. - bindings/cpp: C-compatible bindings - experimental - connect: Rust graphql interface - example: terminal application for the graphql interface ## Getting started Make sure you have a working Rust installation according to the [installation instructions](https://doc.rust-lang.org/cargo/getting-started/installation.html). Open a terminal and type: ```bash cargo run --p example ``` You should see the following output: ```bash Usage: ExampleUploadAcquisition ... ``` If you receive an error, please review or update your Rust installation. ## Compile You can use `cargo build --release` to generate a library that you can include in your project. ```bash cargo build --release ``` A C interface is automatically generated in target/release/: - `include/discovery.h` - header file (cross-platform) - `libdiscovery.so` - shared library (Linux only) - `libdiscovery.dylib` - shared library (MacOS only) - `discovery.dll` - shared library (Windows only) ## Testing To access the Discovery API, you will need: - valid Discovery service account credentials - valid API client credentials When collaborating with Ikerian on a particular project, you will be issued those credentials as part of the project setup. If you have not been issued credentials, please reach out to your contact person. Below is an example call for Linux / Mac: ```bash API_URL='https://api.example.discovery.com' \ CLIENT_ID='12345678-1234-1234-1234-1234567890ab' \ CLIENT_SECRET='1234567890' \ USER='upload-service@example.com' \ PASS='abcdefghij' \ TIMEOUT=300 \ WORKBOOK_UUID='12345678-1234-1234-1234-1234567890ab' \ ACQUISITION_NAME='test-acquisition' \ cargo run -q --p example \ $API_URL $CLIENT_ID $CLIENT_SECRET $USER $PASS $TIMEOUT \ $WORKBOOK_UUID $ACQUISITION_NAME \ 00000001.dcm 00000002.dcm 00000003.dcm 00000004.dcm ``` Below is an example call for Windows: ```bat set API_URL= 'https://api.example.discovery.com' set CLIENT_ID='12345678-1234-1234-1234-1234567890ab' set CLIENT_SECRET='1234567890' set USER='upload-service@example.com' set PASS='abcdefghij' set TIMEOUT=300 set WORKBOOK_UUID='12345678-1234-1234-1234-1234567890ab' set ACQUISITION_NAME='test-acquisition' cargo run -q --project example/DiscoveryExample.csproj ^ %API_URL% %CLIENT_ID% %CLIENT_SECRET% %USER% %PASS% %TIMEOUT% ^ %WORKBOOK_UUID% %ACQUISITION_NAME% ^ 00000001.dcm 00000002.dcm 00000003.dcm 00000004.dcm ``` ## License Copyright 2023 Ikerian AG Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Commit count: 0

cargo fmt