Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Latest commit

 

History

History
419 lines (297 loc) · 11.3 KB

LawsApi.md

File metadata and controls

419 lines (297 loc) · 11.3 KB

LawsApi

All URIs are relative to https://de.openlegaldata.io/api

Method HTTP request Description
lawsCreate POST /laws/
lawsDelete DELETE /laws/{id}/
lawsList GET /laws/
lawsPartialUpdate PATCH /laws/{id}/
lawsRead GET /laws/{id}/
lawsSearchList GET /laws/search/
lawsUpdate PUT /laws/{id}/

lawsCreate

Law lawsCreate(data)

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LawsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

LawsApi apiInstance = new LawsApi();
Law data = new Law(); // Law | 
try {
    Law result = apiInstance.lawsCreate(data);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LawsApi#lawsCreate");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
data Law

Return type

Law

Authorization

api_key

HTTP request headers

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

lawsDelete

lawsDelete(id)

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LawsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

LawsApi apiInstance = new LawsApi();
Integer id = 56; // Integer | A unique integer value identifying this law.
try {
    apiInstance.lawsDelete(id);
} catch (ApiException e) {
    System.err.println("Exception when calling LawsApi#lawsDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer A unique integer value identifying this law.

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

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

lawsList

InlineResponse2009 lawsList(bookId, bookLatest, bookRevisionDate, limit, offset)

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LawsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

LawsApi apiInstance = new LawsApi();
String bookId = "bookId_example"; // String | 
String bookLatest = "bookLatest_example"; // String | 
String bookRevisionDate = "bookRevisionDate_example"; // String | 
Integer limit = 56; // Integer | Number of results to return per page.
Integer offset = 56; // Integer | The initial index from which to return the results.
try {
    InlineResponse2009 result = apiInstance.lawsList(bookId, bookLatest, bookRevisionDate, limit, offset);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LawsApi#lawsList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
bookId String [optional]
bookLatest String [optional]
bookRevisionDate String [optional]
limit Integer Number of results to return per page. [optional]
offset Integer The initial index from which to return the results. [optional]

Return type

InlineResponse2009

Authorization

api_key

HTTP request headers

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

lawsPartialUpdate

Law lawsPartialUpdate(id, data)

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LawsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

LawsApi apiInstance = new LawsApi();
Integer id = 56; // Integer | A unique integer value identifying this law.
Law data = new Law(); // Law | 
try {
    Law result = apiInstance.lawsPartialUpdate(id, data);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LawsApi#lawsPartialUpdate");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer A unique integer value identifying this law.
data Law

Return type

Law

Authorization

api_key

HTTP request headers

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

lawsRead

Law lawsRead(id)

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LawsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

LawsApi apiInstance = new LawsApi();
Integer id = 56; // Integer | A unique integer value identifying this law.
try {
    Law result = apiInstance.lawsRead(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LawsApi#lawsRead");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer A unique integer value identifying this law.

Return type

Law

Authorization

api_key

HTTP request headers

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

lawsSearchList

InlineResponse20010 lawsSearchList(text, facetModelName, bookCode, page, pageSize)

Search view

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LawsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

LawsApi apiInstance = new LawsApi();
String text = "text_example"; // String | Search query on text content (Lucence syntax support).
String facetModelName = "facetModelName_example"; // String | facet_model_name
String bookCode = "bookCode_example"; // String | book_code
Integer page = 56; // Integer | A page number within the paginated result set.
Integer pageSize = 56; // Integer | Number of results to return per page.
try {
    InlineResponse20010 result = apiInstance.lawsSearchList(text, facetModelName, bookCode, page, pageSize);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LawsApi#lawsSearchList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
text String Search query on text content (Lucence syntax support).
facetModelName String facet_model_name [optional]
bookCode String book_code [optional]
page Integer A page number within the paginated result set. [optional]
pageSize Integer Number of results to return per page. [optional]

Return type

InlineResponse20010

Authorization

api_key

HTTP request headers

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

lawsUpdate

Law lawsUpdate(id, data)

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LawsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");

LawsApi apiInstance = new LawsApi();
Integer id = 56; // Integer | A unique integer value identifying this law.
Law data = new Law(); // Law | 
try {
    Law result = apiInstance.lawsUpdate(id, data);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LawsApi#lawsUpdate");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id Integer A unique integer value identifying this law.
data Law

Return type

Law

Authorization

api_key

HTTP request headers

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