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

Latest commit

 

History

History
411 lines (274 loc) · 9.76 KB

LawsApi.md

File metadata and controls

411 lines (274 loc) · 9.76 KB

OldpApi.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

var OldpApi = require('oldp-api');
var defaultClient = OldpApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new OldpApi.LawsApi();

var data = new OldpApi.Law(); // Law | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.lawsCreate(data, callback);

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

var OldpApi = require('oldp-api');
var defaultClient = OldpApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new OldpApi.LawsApi();

var id = 56; // Number | A unique integer value identifying this law.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.lawsDelete(id, , callback);

Parameters

Name Type Description Notes
id Number 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(opts)

Example

var OldpApi = require('oldp-api');
var defaultClient = OldpApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new OldpApi.LawsApi();

var opts = { 
  'bookId': "bookId_example", // String | 
  'bookLatest': "bookLatest_example", // String | 
  'bookRevisionDate': "bookRevisionDate_example", // String | 
  'limit': 56, // Number | Number of results to return per page.
  'offset': 56 // Number | The initial index from which to return the results.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.lawsList(opts, callback);

Parameters

Name Type Description Notes
bookId String [optional]
bookLatest String [optional]
bookRevisionDate String [optional]
limit Number Number of results to return per page. [optional]
offset Number 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

var OldpApi = require('oldp-api');
var defaultClient = OldpApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new OldpApi.LawsApi();

var id = 56; // Number | A unique integer value identifying this law.

var data = new OldpApi.Law(); // Law | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.lawsPartialUpdate(id, data, callback);

Parameters

Name Type Description Notes
id Number 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

var OldpApi = require('oldp-api');
var defaultClient = OldpApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new OldpApi.LawsApi();

var id = 56; // Number | A unique integer value identifying this law.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.lawsRead(id, , callback);

Parameters

Name Type Description Notes
id Number 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, opts)

Search view

Example

var OldpApi = require('oldp-api');
var defaultClient = OldpApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new OldpApi.LawsApi();

var text = "text_example"; // String | Search query on text content (Lucence syntax support).

var opts = { 
  'facetModelName': "facetModelName_example", // String | facet_model_name
  'bookCode': "bookCode_example", // String | book_code
  'page': 56, // Number | A page number within the paginated result set.
  'pageSize': 56 // Number | Number of results to return per page.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.lawsSearchList(text, opts, callback);

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 Number A page number within the paginated result set. [optional]
pageSize Number 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

var OldpApi = require('oldp-api');
var defaultClient = OldpApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new OldpApi.LawsApi();

var id = 56; // Number | A unique integer value identifying this law.

var data = new OldpApi.Law(); // Law | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.lawsUpdate(id, data, callback);

Parameters

Name Type Description Notes
id Number 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