Skip to content
PHP SDK for accessing the Open Legal Data API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
lib
test
.php_cs
.travis.yml
README.md
composer.json
git_push.sh
phpunit.xml.dist

README.md

SwaggerClient-php

With the Open Legal Data API you can access various data from the legal domain, e.g. law text or case files. The data may be used for semantic analysis or to create statistics. For more information visit our website. https://openlegaldata.io/

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: v1
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/openlegaldata/oldp-sdk-php.git"
    }
  ],
  "require": {
    "openlegaldata/oldp-sdk-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Swagger\Client\Api\AnnotationLabelsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$data = new \Swagger\Client\Model\AnnotationLabel(); // \Swagger\Client\Model\AnnotationLabel | 

try {
    $result = $apiInstance->annotationLabelsCreate($data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnnotationLabelsApi->annotationLabelsCreate: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

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

Class Method HTTP request Description
AnnotationLabelsApi annotationLabelsCreate POST /annotation_labels/
AnnotationLabelsApi annotationLabelsDelete DELETE /annotation_labels/{id}/
AnnotationLabelsApi annotationLabelsList GET /annotation_labels/
AnnotationLabelsApi annotationLabelsPartialUpdate PATCH /annotation_labels/{id}/
AnnotationLabelsApi annotationLabelsRead GET /annotation_labels/{id}/
AnnotationLabelsApi annotationLabelsUpdate PUT /annotation_labels/{id}/
CaseAnnotationsApi caseAnnotationsCreate POST /case_annotations/
CaseAnnotationsApi caseAnnotationsDelete DELETE /case_annotations/{id}/
CaseAnnotationsApi caseAnnotationsList GET /case_annotations/
CaseAnnotationsApi caseAnnotationsPartialUpdate PATCH /case_annotations/{id}/
CaseAnnotationsApi caseAnnotationsRead GET /case_annotations/{id}/
CaseAnnotationsApi caseAnnotationsUpdate PUT /case_annotations/{id}/
CaseMarkersApi caseMarkersCreate POST /case_markers/
CaseMarkersApi caseMarkersDelete DELETE /case_markers/{id}/
CaseMarkersApi caseMarkersList GET /case_markers/
CaseMarkersApi caseMarkersPartialUpdate PATCH /case_markers/{id}/
CaseMarkersApi caseMarkersRead GET /case_markers/{id}/
CaseMarkersApi caseMarkersUpdate PUT /case_markers/{id}/
CasesApi casesCreate POST /cases/
CasesApi casesDelete DELETE /cases/{id}/
CasesApi casesList GET /cases/
CasesApi casesPartialUpdate PATCH /cases/{id}/
CasesApi casesRead GET /cases/{id}/
CasesApi casesSearchList GET /cases/search/
CasesApi casesUpdate PUT /cases/{id}/
CitiesApi citiesList GET /cities/
CitiesApi citiesRead GET /cities/{id}/
CountriesApi countriesList GET /countries/
CountriesApi countriesRead GET /countries/{id}/
CourtsApi courtsList GET /courts/
CourtsApi courtsRead GET /courts/{id}/
LawBooksApi lawBooksCreate POST /law_books/
LawBooksApi lawBooksDelete DELETE /law_books/{id}/
LawBooksApi lawBooksList GET /law_books/
LawBooksApi lawBooksPartialUpdate PATCH /law_books/{id}/
LawBooksApi lawBooksRead GET /law_books/{id}/
LawBooksApi lawBooksUpdate PUT /law_books/{id}/
LawsApi lawsCreate POST /laws/
LawsApi lawsDelete DELETE /laws/{id}/
LawsApi lawsList GET /laws/
LawsApi lawsPartialUpdate PATCH /laws/{id}/
LawsApi lawsRead GET /laws/{id}/
LawsApi lawsSearchList GET /laws/search/
LawsApi lawsUpdate PUT /laws/{id}/
StatesApi statesList GET /states/
StatesApi statesRead GET /states/{id}/
TokenAuthApi tokenAuthCreate POST /token-auth/
UsersApi usersList GET /users/
UsersApi usersMe GET /users/me/
UsersApi usersRead GET /users/{id}/

Documentation For Models

Documentation For Authorization

api_key

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

hello@openlegaldata.io

You can’t perform that action at this time.