lettera

KSF Media's articles service

Changelog for V3:
  • Unified ListArticle and RelatedArticle into a single type ArticleStub. NOTE: In contrast to the old types, ArticleStub.relatedArticles is now an optional value.
  • Added endpoint /article/{uuid}/stub
  • Removed deprecated endpoint /article/search

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 3.0.0
  • Build package: org.openapitools.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": "vcs",
      "url": "https://github.com/KSF-Media/lettera-php-client.git"
    }
  ],
  "require": {
    "KSF-Media/lettera-php-client": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/lettera/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');



$apiInstance = new OpenAPI\Client\Api\ArticlesApi(
    // 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()
);
$uuid = 'uuid_example'; // string | 
$auth_user = 'auth_user_example'; // string | 
$authorization = 'authorization_example'; // string | 
$x_real_ip = 'x_real_ip_example'; // string | 
$textonly = false; // bool | 

try {
    $result = $apiInstance->articleUuidGet($uuid, $auth_user, $authorization, $x_real_ip, $textonly);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ArticlesApi->articleUuidGet: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to http://http:/v3

Class Method HTTP request Description
ArticlesApi articleUuidGet GET /article/{uuid}
ArticlesApi articleUuidStubGet GET /article/{uuid}/stub
CategoriesApi categoriesGet GET /categories Read categories
ListsApi frontpageGet GET /frontpage Returns a list for a front page
ListsApi latestGet GET /latest Returns a list of latest articles
ListsApi mostreadGet GET /mostread Returns a list of most read articles
ListsApi presetPresetCategoryGet GET /preset/{preset}/{category} Load a preset model
ListsApi presetPresetCategoryPost POST /preset/{preset}/{category} Update a preset model
ListsApi searchGet GET /search Returns a list of search results
ListsApi tagTagGet GET /tag/{tag} Returns a list of latest articles by tag

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author