Skip to content

Latest commit

 

History

History
367 lines (250 loc) · 11.6 KB

AnnotationsApi.md

File metadata and controls

367 lines (250 loc) · 11.6 KB

swagger.api.AnnotationsApi

Load the API package

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

countAnnotations

int countAnnotations(authorization, target, acceptLanguage)

Count annotations

Example

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");
}

Parameters

Name Type Description Notes
authorization String Authentication token
target String Target URI [optional]
acceptLanguage String Request accepted language [optional]

Return type

int

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createAnnotation

ObjectUriResponse createAnnotation(authorization, body, acceptLanguage)

Create an annotation

Example

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");
}

Parameters

Name Type Description Notes
authorization String Authentication token
body AnnotationCreationDTO [optional]
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAnnotation

ObjectUriResponse deleteAnnotation(uri, authorization, acceptLanguage)

Delete an annotation

Example

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");
}

Parameters

Name Type Description Notes
uri String Annotation URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAnnotation

AnnotationGetDTO getAnnotation(uri, authorization, acceptLanguage)

Get an annotation

Example

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");
}

Parameters

Name Type Description Notes
uri String Event URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

AnnotationGetDTO

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

searchAnnotations

List searchAnnotations(authorization, description, target, motivation, author, orderBy, page, pageSize, acceptLanguage)

Search annotations

Example

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");
}

Parameters

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]

Return type

List

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

searchMotivations

List searchMotivations(authorization, name, orderBy, page, pageSize, acceptLanguage)

Search motivations

Example

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");
}

Parameters

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]

Return type

List

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateAnnotation

ObjectUriResponse updateAnnotation(authorization, body, acceptLanguage)

Update an annotation

Example

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");
}

Parameters

Name Type Description Notes
authorization String Authentication token
body AnnotationUpdateDTO Annotation description [optional]
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]