import 'package:swagger/api.dart';
All URIs are relative to https://localhost
Method | HTTP request | Description |
---|---|---|
countAnnotations | GET /core/annotations/count | Count annotations |
createAnnotation | POST /core/annotations | Create an annotation |
deleteAnnotation | DELETE /core/annotations/{uri} | Delete an annotation |
getAnnotation | GET /core/annotations/{uri} | Get an annotation |
searchAnnotations | GET /core/annotations | Search annotations |
searchMotivations | GET /core/annotations/motivations | Search motivations |
updateAnnotation | PUT /core/annotations | Update an annotation |
int countAnnotations(authorization, target, acceptLanguage)
Count annotations
import 'package:swagger/api.dart';
var api_instance = new AnnotationsApi();
var authorization = authorization_example; // String | Authentication token
var target = "http://www.opensilex.org/demo/2018/o18000076"; // String | Target URI
var acceptLanguage = "en"; // String | Request accepted language
try {
var result = api_instance.countAnnotations(authorization, target, acceptLanguage);
print(result);
} catch (e) {
print("Exception when calling AnnotationsApi->countAnnotations: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | String | Authentication token | |
target | String | Target URI | [optional] |
acceptLanguage | String | Request accepted language | [optional] |
int
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ObjectUriResponse createAnnotation(authorization, body, acceptLanguage)
Create an annotation
import 'package:swagger/api.dart';
var api_instance = new AnnotationsApi();
var authorization = authorization_example; // String | Authentication token
var body = new AnnotationCreationDTO(); // AnnotationCreationDTO |
var acceptLanguage = "en"; // String | Request accepted language
try {
var result = api_instance.createAnnotation(authorization, body, acceptLanguage);
print(result);
} catch (e) {
print("Exception when calling AnnotationsApi->createAnnotation: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | String | Authentication token | |
body | AnnotationCreationDTO | [optional] | |
acceptLanguage | String | Request accepted language | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ObjectUriResponse deleteAnnotation(uri, authorization, acceptLanguage)
Delete an annotation
import 'package:swagger/api.dart';
var api_instance = new AnnotationsApi();
var uri = "http://www.opensilex.org/annotations/12590c87-1c34-426b-a231-beb7acb33415"; // String | Annotation URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language
try {
var result = api_instance.deleteAnnotation(uri, authorization, acceptLanguage);
print(result);
} catch (e) {
print("Exception when calling AnnotationsApi->deleteAnnotation: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
uri | String | Annotation URI | |
authorization | String | Authentication token | |
acceptLanguage | String | Request accepted language | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnnotationGetDTO getAnnotation(uri, authorization, acceptLanguage)
Get an annotation
import 'package:swagger/api.dart';
var api_instance = new AnnotationsApi();
var uri = "http://www.opensilex.org/annotations/12590c87-1c34-426b-a231-beb7acb33415"; // String | Event URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language
try {
var result = api_instance.getAnnotation(uri, authorization, acceptLanguage);
print(result);
} catch (e) {
print("Exception when calling AnnotationsApi->getAnnotation: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
uri | String | Event URI | |
authorization | String | Authentication token | |
acceptLanguage | String | Request accepted language | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List searchAnnotations(authorization, description, target, motivation, author, orderBy, page, pageSize, acceptLanguage)
Search annotations
import 'package:swagger/api.dart';
var api_instance = new AnnotationsApi();
var authorization = authorization_example; // String | Authentication token
var description = "The pest attack"; // String | Description (regex)
var target = "http://www.opensilex.org/demo/2018/o18000076"; // String | Target URI
var motivation = "http://www.w3.org/ns/oa#describing"; // String | Motivation URI
var author = "http://opensilex.dev/users#Admin.OpenSilex"; // String | Author URI
var orderBy = ["author=asc"]; // List<String> | List of fields to sort as an array of fieldName=asc|desc
var page = 0; // int | Page number
var pageSize = 20; // int | Page size
var acceptLanguage = "en"; // String | Request accepted language
try {
var result = api_instance.searchAnnotations(authorization, description, target, motivation, author, orderBy, page, pageSize, acceptLanguage);
print(result);
} catch (e) {
print("Exception when calling AnnotationsApi->searchAnnotations: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | String | Authentication token | |
description | String | Description (regex) | [optional] |
target | String | Target URI | [optional] |
motivation | String | Motivation URI | [optional] |
author | String | Author URI | [optional] |
orderBy | List<String> | List of fields to sort as an array of fieldName=asc | desc |
page | int | Page number | [optional] [default to 0] |
pageSize | int | Page size | [optional] [default to 20] |
acceptLanguage | String | Request accepted language | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List searchMotivations(authorization, name, orderBy, page, pageSize, acceptLanguage)
Search motivations
import 'package:swagger/api.dart';
var api_instance = new AnnotationsApi();
var authorization = authorization_example; // String | Authentication token
var name = "describing"; // String | Motivation name regex pattern
var orderBy = ["uri=asc"]; // List<String> | List of fields to sort as an array of fieldName=asc|desc
var page = 0; // int | Page number
var pageSize = 20; // int | Page size
var acceptLanguage = "en"; // String | Request accepted language
try {
var result = api_instance.searchMotivations(authorization, name, orderBy, page, pageSize, acceptLanguage);
print(result);
} catch (e) {
print("Exception when calling AnnotationsApi->searchMotivations: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | String | Authentication token | |
name | String | Motivation name regex pattern | [optional] |
orderBy | List<String> | List of fields to sort as an array of fieldName=asc | desc |
page | int | Page number | [optional] [default to 0] |
pageSize | int | Page size | [optional] [default to 20] |
acceptLanguage | String | Request accepted language | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ObjectUriResponse updateAnnotation(authorization, body, acceptLanguage)
Update an annotation
import 'package:swagger/api.dart';
var api_instance = new AnnotationsApi();
var authorization = authorization_example; // String | Authentication token
var body = new AnnotationUpdateDTO(); // AnnotationUpdateDTO | Annotation description
var acceptLanguage = "en"; // String | Request accepted language
try {
var result = api_instance.updateAnnotation(authorization, body, acceptLanguage);
print(result);
} catch (e) {
print("Exception when calling AnnotationsApi->updateAnnotation: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
authorization | String | Authentication token | |
body | AnnotationUpdateDTO | Annotation description | [optional] |
acceptLanguage | String | Request accepted language | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]