Skip to content

krishnakumarkp/sdk-php

Repository files navigation

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

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

  • API version: 3.0.0
  • Package version: 1.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": "git",
      "url": "https://github.com/Krishnakumarkp/sdk-php.git"
    }
  ],
  "require": {
    "Krishnakumarkp/sdk-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to//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 Bookstore\Client\Api\BooksApi(
    // 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()
);
$newbook = new \Bookstore\Client\Model\Newbook(); // \Bookstore\Client\Model\Newbook | Book to add to the store

try {
    $apiInstance->addBook($newbook);
} catch (Exception $e) {
    echo 'Exception when calling BooksApi->addBook: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to http://192.168.100.10:8080/api/v1

Class Method HTTP request Description
BooksApi addBook POST /books Creates a new book
BooksApi deleteBook DELETE /books/{id}
BooksApi findBook GET /books/{id} get book by id
BooksApi listBook GET /books List of books
BooksApi updateBook PUT /books/{id}

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published