diff --git a/README.md b/README.md index 64777d1..b2b045b 100644 --- a/README.md +++ b/README.md @@ -1,117 +1,76 @@ -# R API client for openapi +# R API client for laminr.api -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI spec](https://openapis.org) from a remote server, you can easily generate an API client. - -- API version: 0.1.0 -- Package version: 1.0.0 -- Generator version: 7.8.0 -- Build package: org.openapitools.codegen.languages.RClientCodegen ## Installation -### Prerequisites - -Install the dependencies - -```R -install.packages("jsonlite") -install.packages("httr") -install.packages("base64enc") -``` - -### Build the package - -```sh -git clone https://github.com/GIT_USER_ID/GIT_REPO_ID -cd GIT_REPO_ID -R CMD build . -R CMD check openapi_1.0.0.tar.gz --no-manual -R CMD INSTALL --preclean openapi_1.0.0.tar.gz -``` - -### Install the package - -```R -install.packages("openapi") +``` r +install.packages("devtools") ``` To install directly from Github, use `devtools`: -```R + +``` r install.packages("devtools") library(devtools) -install_github("GIT_USER_ID/GIT_REPO_ID") -``` - -To install the package from a local file: -```R -install.packages("openapi_1.0.0.tar.gz", repos = NULL, type = "source") +install_github("data-intuitive/laminr.api") ``` ### Usage -```R -library(openapi) -``` +``` r +library(laminr.api) -### Reformat code +api_url <- getOption("lamindb_current_instance")$api_url +instance_id <- getOption("lamindb_current_instance")$id +schema_id <- getOption("lamindb_current_instance")$schema_id -To reformat code using [styler](https://styler.r-lib.org/index.html), please run the following in the R console: +client <- ApiClient$new(api_url) -```R -install.packages("remotes") -remotes::install_github("r-lib/styler@v1.7.0.9003") -library("styler") -style_dir() +# client$Execute #? +# client$CallApi #? ``` ## Documentation for API Endpoints All URIs are relative to *http://localhost* -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut**](docs/DefaultApi.md#AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut) | **PUT** /instances/{instance_id}/collaborators/{account_id} | Add Collaborator -*DefaultApi* | [**CreateInstanceInstancesPut**](docs/DefaultApi.md#CreateInstanceInstancesPut) | **PUT** /instances | Create Instance -*DefaultApi* | [**CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut**](docs/DefaultApi.md#CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut) | **PUT** /instances/{instance_id}/modules/{module_name}/{model_name} | Create Record -*DefaultApi* | [**DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete**](docs/DefaultApi.md#DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete) | **DELETE** /instances/{instance_id}/collaborators/{account_id} | Delete Collaborator -*DefaultApi* | [**DeleteInstanceInstancesInstanceIdDelete**](docs/DefaultApi.md#DeleteInstanceInstancesInstanceIdDelete) | **DELETE** /instances/{instance_id} | Delete Instance -*DefaultApi* | [**DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete**](docs/DefaultApi.md#DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete) | **DELETE** /instances/{instance_id}/modules/{module_name}/{model_name}/{uid} | Delete Record -*DefaultApi* | [**GeneratePasswordInstancesInstanceIdDbPasswordGet**](docs/DefaultApi.md#GeneratePasswordInstancesInstanceIdDbPasswordGet) | **GET** /instances/{instance_id}/db/password | Generate Password -*DefaultApi* | [**GenerateUrlInstancesInstanceIdDbUrlGet**](docs/DefaultApi.md#GenerateUrlInstancesInstanceIdDbUrlGet) | **GET** /instances/{instance_id}/db/url | Generate Url -*DefaultApi* | [**GetInstanceStatisticsInstancesInstanceIdStatisticsGet**](docs/DefaultApi.md#GetInstanceStatisticsInstancesInstanceIdStatisticsGet) | **GET** /instances/{instance_id}/statistics | Get Instance Statistics -*DefaultApi* | [**GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet**](docs/DefaultApi.md#GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet) | **GET** /instances/{instance_id}/non_empty_tables | Get Non Empty Tables -*DefaultApi* | [**GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost**](docs/DefaultApi.md#GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/{id_or_uid} | Get Record -*DefaultApi* | [**GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost**](docs/DefaultApi.md#GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name} | Get Records -*DefaultApi* | [**GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet**](docs/DefaultApi.md#GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet) | **GET** /instances/{instance_id}/schema/{module_name}/{model_name} | Get Relations -*DefaultApi* | [**GetSchemaInstancesInstanceIdSchemaGet**](docs/DefaultApi.md#GetSchemaInstancesInstanceIdSchemaGet) | **GET** /instances/{instance_id}/schema | Get Schema -*DefaultApi* | [**GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost**](docs/DefaultApi.md#GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/fields/{field_path} | Get Values -*DefaultApi* | [**GrantS3PermissionsStoragesS3BucketNamePermissionsPut**](docs/DefaultApi.md#GrantS3PermissionsStoragesS3BucketNamePermissionsPut) | **PUT** /storages/s3/{bucket_name}/permissions | Grant S3 Permissions -*DefaultApi* | [**GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost**](docs/DefaultApi.md#GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/group-by | Group By -*DefaultApi* | [**TransferOwnershipInstancesInstanceIdOwnerHandlePatch**](docs/DefaultApi.md#TransferOwnershipInstancesInstanceIdOwnerHandlePatch) | **PATCH** /instances/{instance_id}/owner/{handle} | Transfer Ownership -*DefaultApi* | [**UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch**](docs/DefaultApi.md#UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch) | **PATCH** /instances/{instance_id}/collaborators/{account_id} | Update Collaborator -*DefaultApi* | [**UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch**](docs/DefaultApi.md#UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch) | **PATCH** /instances/{instance_id}/modules/{module_name}/{model_name}/{uid} | Update Record - +| Class | Method | HTTP request | Description | +|----|----|----|----| +| *DefaultApi* | [**AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut**](docs/DefaultApi.md#AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut) | **PUT** /instances/{instance_id}/collaborators/{account_id} | Add Collaborator | +| *DefaultApi* | [**CreateInstanceInstancesPut**](docs/DefaultApi.md#CreateInstanceInstancesPut) | **PUT** /instances | Create Instance | +| *DefaultApi* | [**CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut**](docs/DefaultApi.md#CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut) | **PUT** /instances/{instance_id}/modules/{module_name}/{model_name} | Create Record | +| *DefaultApi* | [**DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete**](docs/DefaultApi.md#DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete) | **DELETE** /instances/{instance_id}/collaborators/{account_id} | Delete Collaborator | +| *DefaultApi* | [**DeleteInstanceInstancesInstanceIdDelete**](docs/DefaultApi.md#DeleteInstanceInstancesInstanceIdDelete) | **DELETE** /instances/{instance_id} | Delete Instance | +| *DefaultApi* | [**DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete**](docs/DefaultApi.md#DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete) | **DELETE** /instances/{instance_id}/modules/{module_name}/{model_name}/{uid} | Delete Record | +| *DefaultApi* | [**GeneratePasswordInstancesInstanceIdDbPasswordGet**](docs/DefaultApi.md#GeneratePasswordInstancesInstanceIdDbPasswordGet) | **GET** /instances/{instance_id}/db/password | Generate Password | +| *DefaultApi* | [**GenerateUrlInstancesInstanceIdDbUrlGet**](docs/DefaultApi.md#GenerateUrlInstancesInstanceIdDbUrlGet) | **GET** /instances/{instance_id}/db/url | Generate Url | +| *DefaultApi* | [**GetInstanceStatisticsInstancesInstanceIdStatisticsGet**](docs/DefaultApi.md#GetInstanceStatisticsInstancesInstanceIdStatisticsGet) | **GET** /instances/{instance_id}/statistics | Get Instance Statistics | +| *DefaultApi* | [**GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet**](docs/DefaultApi.md#GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet) | **GET** /instances/{instance_id}/non_empty_tables | Get Non Empty Tables | +| *DefaultApi* | [**GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost**](docs/DefaultApi.md#GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/{id_or_uid} | Get Record | +| *DefaultApi* | [**GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost**](docs/DefaultApi.md#GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name} | Get Records | +| *DefaultApi* | [**GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet**](docs/DefaultApi.md#GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet) | **GET** /instances/{instance_id}/schema/{module_name}/{model_name} | Get Relations | +| *DefaultApi* | [**GetSchemaInstancesInstanceIdSchemaGet**](docs/DefaultApi.md#GetSchemaInstancesInstanceIdSchemaGet) | **GET** /instances/{instance_id}/schema | Get Schema | +| *DefaultApi* | [**GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost**](docs/DefaultApi.md#GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/fields/{field_path} | Get Values | +| *DefaultApi* | [**GrantS3PermissionsStoragesS3BucketNamePermissionsPut**](docs/DefaultApi.md#GrantS3PermissionsStoragesS3BucketNamePermissionsPut) | **PUT** /storages/s3/{bucket_name}/permissions | Grant S3 Permissions | +| *DefaultApi* | [**GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost**](docs/DefaultApi.md#GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/group-by | Group By | +| *DefaultApi* | [**TransferOwnershipInstancesInstanceIdOwnerHandlePatch**](docs/DefaultApi.md#TransferOwnershipInstancesInstanceIdOwnerHandlePatch) | **PATCH** /instances/{instance_id}/owner/{handle} | Transfer Ownership | +| *DefaultApi* | [**UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch**](docs/DefaultApi.md#UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch) | **PATCH** /instances/{instance_id}/collaborators/{account_id} | Update Collaborator | +| *DefaultApi* | [**UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch**](docs/DefaultApi.md#UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch) | **PATCH** /instances/{instance_id}/modules/{module_name}/{model_name}/{uid} | Update Record | ## Documentation for Models - - [Dimension](docs/Dimension.md) - - [GetRecordRequestBody](docs/GetRecordRequestBody.md) - - [GetRecordsRequestBody](docs/GetRecordsRequestBody.md) - - [GetValuesRequestBody](docs/GetValuesRequestBody.md) - - [GroupByRequestBody](docs/GroupByRequestBody.md) - - [HTTPValidationError](docs/HTTPValidationError.md) - - [Measure](docs/Measure.md) - - [OrderByColumn](docs/OrderByColumn.md) - - [S3PermissionsRequest](docs/S3PermissionsRequest.md) - - [ValidationError](docs/ValidationError.md) - - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) - +- [Dimension](docs/Dimension.md) +- [GetRecordRequestBody](docs/GetRecordRequestBody.md) +- [GetRecordsRequestBody](docs/GetRecordsRequestBody.md) +- [GetValuesRequestBody](docs/GetValuesRequestBody.md) +- [GroupByRequestBody](docs/GroupByRequestBody.md) +- [HTTPValidationError](docs/HTTPValidationError.md) +- [Measure](docs/Measure.md) +- [OrderByColumn](docs/OrderByColumn.md) +- [S3PermissionsRequest](docs/S3PermissionsRequest.md) +- [ValidationError](docs/ValidationError.md) +- [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) ## Documentation for Authorization Endpoints do not require authorization. - - diff --git a/README.qmd b/README.qmd new file mode 100644 index 0000000..16db731 --- /dev/null +++ b/README.qmd @@ -0,0 +1,82 @@ +--- +title: R API client for laminr.api +format: gfm +--- + +## Installation + +```R +install.packages("devtools") +``` + +To install directly from Github, use `devtools`: +```R +install.packages("devtools") +library(devtools) +install_github("data-intuitive/laminr.api") +``` + +### Usage + +```{r} +library(laminr.api) + +api_url <- getOption("lamindb_current_instance")$api_url +instance_id <- getOption("lamindb_current_instance")$id +schema_id <- getOption("lamindb_current_instance")$schema_id + +client <- ApiClient$new(api_url) + +# client$Execute #? +# client$CallApi #? +``` + + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut**](docs/DefaultApi.md#AddCollaboratorInstancesInstanceIdCollaboratorsAccountIdPut) | **PUT** /instances/{instance_id}/collaborators/{account_id} | Add Collaborator +*DefaultApi* | [**CreateInstanceInstancesPut**](docs/DefaultApi.md#CreateInstanceInstancesPut) | **PUT** /instances | Create Instance +*DefaultApi* | [**CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut**](docs/DefaultApi.md#CreateRecordInstancesInstanceIdModulesModuleNameModelNamePut) | **PUT** /instances/{instance_id}/modules/{module_name}/{model_name} | Create Record +*DefaultApi* | [**DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete**](docs/DefaultApi.md#DeleteCollaboratorInstancesInstanceIdCollaboratorsAccountIdDelete) | **DELETE** /instances/{instance_id}/collaborators/{account_id} | Delete Collaborator +*DefaultApi* | [**DeleteInstanceInstancesInstanceIdDelete**](docs/DefaultApi.md#DeleteInstanceInstancesInstanceIdDelete) | **DELETE** /instances/{instance_id} | Delete Instance +*DefaultApi* | [**DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete**](docs/DefaultApi.md#DeleteRecordInstancesInstanceIdModulesModuleNameModelNameUidDelete) | **DELETE** /instances/{instance_id}/modules/{module_name}/{model_name}/{uid} | Delete Record +*DefaultApi* | [**GeneratePasswordInstancesInstanceIdDbPasswordGet**](docs/DefaultApi.md#GeneratePasswordInstancesInstanceIdDbPasswordGet) | **GET** /instances/{instance_id}/db/password | Generate Password +*DefaultApi* | [**GenerateUrlInstancesInstanceIdDbUrlGet**](docs/DefaultApi.md#GenerateUrlInstancesInstanceIdDbUrlGet) | **GET** /instances/{instance_id}/db/url | Generate Url +*DefaultApi* | [**GetInstanceStatisticsInstancesInstanceIdStatisticsGet**](docs/DefaultApi.md#GetInstanceStatisticsInstancesInstanceIdStatisticsGet) | **GET** /instances/{instance_id}/statistics | Get Instance Statistics +*DefaultApi* | [**GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet**](docs/DefaultApi.md#GetNonEmptyTablesInstancesInstanceIdNonEmptyTablesGet) | **GET** /instances/{instance_id}/non_empty_tables | Get Non Empty Tables +*DefaultApi* | [**GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost**](docs/DefaultApi.md#GetRecordInstancesInstanceIdModulesModuleNameModelNameIdOrUidPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/{id_or_uid} | Get Record +*DefaultApi* | [**GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost**](docs/DefaultApi.md#GetRecordsInstancesInstanceIdModulesModuleNameModelNamePost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name} | Get Records +*DefaultApi* | [**GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet**](docs/DefaultApi.md#GetRelationsInstancesInstanceIdSchemaModuleNameModelNameGet) | **GET** /instances/{instance_id}/schema/{module_name}/{model_name} | Get Relations +*DefaultApi* | [**GetSchemaInstancesInstanceIdSchemaGet**](docs/DefaultApi.md#GetSchemaInstancesInstanceIdSchemaGet) | **GET** /instances/{instance_id}/schema | Get Schema +*DefaultApi* | [**GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost**](docs/DefaultApi.md#GetValuesInstancesInstanceIdModulesModuleNameModelNameFieldsFieldPathPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/fields/{field_path} | Get Values +*DefaultApi* | [**GrantS3PermissionsStoragesS3BucketNamePermissionsPut**](docs/DefaultApi.md#GrantS3PermissionsStoragesS3BucketNamePermissionsPut) | **PUT** /storages/s3/{bucket_name}/permissions | Grant S3 Permissions +*DefaultApi* | [**GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost**](docs/DefaultApi.md#GroupByInstancesInstanceIdModulesModuleNameModelNameGroupByPost) | **POST** /instances/{instance_id}/modules/{module_name}/{model_name}/group-by | Group By +*DefaultApi* | [**TransferOwnershipInstancesInstanceIdOwnerHandlePatch**](docs/DefaultApi.md#TransferOwnershipInstancesInstanceIdOwnerHandlePatch) | **PATCH** /instances/{instance_id}/owner/{handle} | Transfer Ownership +*DefaultApi* | [**UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch**](docs/DefaultApi.md#UpdateCollaboratorInstancesInstanceIdCollaboratorsAccountIdPatch) | **PATCH** /instances/{instance_id}/collaborators/{account_id} | Update Collaborator +*DefaultApi* | [**UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch**](docs/DefaultApi.md#UpdateRecordInstancesInstanceIdModulesModuleNameModelNameUidPatch) | **PATCH** /instances/{instance_id}/modules/{module_name}/{model_name}/{uid} | Update Record + + +## Documentation for Models + + - [Dimension](docs/Dimension.md) + - [GetRecordRequestBody](docs/GetRecordRequestBody.md) + - [GetRecordsRequestBody](docs/GetRecordsRequestBody.md) + - [GetValuesRequestBody](docs/GetValuesRequestBody.md) + - [GroupByRequestBody](docs/GroupByRequestBody.md) + - [HTTPValidationError](docs/HTTPValidationError.md) + - [Measure](docs/Measure.md) + - [OrderByColumn](docs/OrderByColumn.md) + - [S3PermissionsRequest](docs/S3PermissionsRequest.md) + - [ValidationError](docs/ValidationError.md) + - [ValidationErrorLocInner](docs/ValidationErrorLocInner.md) + + +## Documentation for Authorization + +Endpoints do not require authorization. + +