|
| 1 | +# SwaggerClient-php |
| 2 | +This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). |
| 3 | + |
| 4 | +This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: |
| 5 | + |
| 6 | +- API version: 1.0.0 |
| 7 | +- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen |
| 8 | + |
| 9 | +## Requirements |
| 10 | + |
| 11 | +PHP 5.5 and later |
| 12 | + |
| 13 | +## Installation & Usage |
| 14 | +### Composer |
| 15 | + |
| 16 | +To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`: |
| 17 | + |
| 18 | +``` |
| 19 | +{ |
| 20 | + "repositories": [ |
| 21 | + { |
| 22 | + "type": "git", |
| 23 | + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" |
| 24 | + } |
| 25 | + ], |
| 26 | + "require": { |
| 27 | + "GIT_USER_ID/GIT_REPO_ID": "*@dev" |
| 28 | + } |
| 29 | +} |
| 30 | +``` |
| 31 | + |
| 32 | +Then run `composer install` |
| 33 | + |
| 34 | +### Manual Installation |
| 35 | + |
| 36 | +Download the files and include `autoload.php`: |
| 37 | + |
| 38 | +```php |
| 39 | + require_once('/path/to/SwaggerClient-php/vendor/autoload.php'); |
| 40 | +``` |
| 41 | + |
| 42 | +## Tests |
| 43 | + |
| 44 | +To run the unit tests: |
| 45 | + |
| 46 | +``` |
| 47 | +composer install |
| 48 | +./vendor/bin/phpunit |
| 49 | +``` |
| 50 | + |
| 51 | +## Getting Started |
| 52 | + |
| 53 | +Please follow the [installation procedure](#installation--usage) and then run the following: |
| 54 | + |
| 55 | +```php |
| 56 | +<?php |
| 57 | +require_once(__DIR__ . '/vendor/autoload.php'); |
| 58 | + |
| 59 | + |
| 60 | +$apiInstance = new Swagger\Client\Api\DefaultApi( |
| 61 | + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. |
| 62 | + // This is optional, `GuzzleHttp\Client` will be used as default. |
| 63 | + new GuzzleHttp\Client(), |
| 64 | + $config |
| 65 | +); |
| 66 | + |
| 67 | +try { |
| 68 | + $result = $apiInstance->testMethod(); |
| 69 | + print_r($result); |
| 70 | +} catch (Exception $e) { |
| 71 | + echo 'Exception when calling DefaultApi->testMethod: ', $e->getMessage(), PHP_EOL; |
| 72 | +} |
| 73 | +?> |
| 74 | +``` |
| 75 | + |
| 76 | +## Documentation for API Endpoints |
| 77 | + |
| 78 | +All URIs are relative to */* |
| 79 | + |
| 80 | +Class | Method | HTTP request | Description |
| 81 | +------------ | ------------- | ------------- | ------------- |
| 82 | +*DefaultApi* | [**testMethod**](docs/Api/DefaultApi.md#testmethod) | **GET** /test | |
| 83 | +*PetApi* | [**addParrot**](docs/Api/PetApi.md#addparrot) | **POST** /parrot | Add a new parrow to the store |
| 84 | +*PetApi* | [**addPet**](docs/Api/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store |
| 85 | +*PetApi* | [**deletePet**](docs/Api/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet |
| 86 | +*PetApi* | [**feedPet**](docs/Api/PetApi.md#feedpet) | **POST** /pet/feed/{petId} | Find pet by ID |
| 87 | +*PetApi* | [**findPetsByStatus**](docs/Api/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status |
| 88 | +*PetApi* | [**findPetsByTags**](docs/Api/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags |
| 89 | +*PetApi* | [**getParrots**](docs/Api/PetApi.md#getparrots) | **GET** /parrot | get Parrots |
| 90 | +*PetApi* | [**getPetById**](docs/Api/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID |
| 91 | +*PetApi* | [**updateParrots**](docs/Api/PetApi.md#updateparrots) | **PUT** /parrot | update parrots |
| 92 | +*PetApi* | [**updatePet**](docs/Api/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet |
| 93 | +*PetApi* | [**updatePetWithForm**](docs/Api/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data |
| 94 | +*PetApi* | [**uploadFile**](docs/Api/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image |
| 95 | +*StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID |
| 96 | +*StoreApi* | [**getInventory**](docs/Api/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status |
| 97 | +*StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID |
| 98 | +*StoreApi* | [**placeOrder**](docs/Api/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet |
| 99 | +*UserApi* | [**createUser**](docs/Api/UserApi.md#createuser) | **POST** /user | Create user |
| 100 | +*UserApi* | [**createUsersWithArrayInput**](docs/Api/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array |
| 101 | +*UserApi* | [**createUsersWithListInput**](docs/Api/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array |
| 102 | +*UserApi* | [**deleteUser**](docs/Api/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user |
| 103 | +*UserApi* | [**getUserByName**](docs/Api/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name |
| 104 | +*UserApi* | [**loginUser**](docs/Api/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system |
| 105 | +*UserApi* | [**logoutUser**](docs/Api/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session |
| 106 | +*UserApi* | [**userUsernamePut**](docs/Api/UserApi.md#userusernameput) | **PUT** /user/{username} | Updated user |
| 107 | + |
| 108 | +## Documentation For Models |
| 109 | + |
| 110 | + - [AllPetsResponse](docs/Model/AllPetsResponse.md) |
| 111 | + - [AnyOfbody2](docs/Model/AnyOfbody2.md) |
| 112 | + - [ApiResponse](docs/Model/ApiResponse.md) |
| 113 | + - [Body](docs/Model/Body.md) |
| 114 | + - [Body1](docs/Model/Body1.md) |
| 115 | + - [Body2](docs/Model/Body2.md) |
| 116 | + - [Cat](docs/Model/Cat.md) |
| 117 | + - [Category](docs/Model/Category.md) |
| 118 | + - [Dog](docs/Model/Dog.md) |
| 119 | + - [InlineResponse200](docs/Model/InlineResponse200.md) |
| 120 | + - [InlineResponse2001](docs/Model/InlineResponse2001.md) |
| 121 | + - [Macaw](docs/Model/Macaw.md) |
| 122 | + - [OneOfAllPetsResponseItems](docs/Model/OneOfAllPetsResponseItems.md) |
| 123 | + - [OneOfPartMasterOrigin](docs/Model/OneOfPartMasterOrigin.md) |
| 124 | + - [OneOfPup](docs/Model/OneOfPup.md) |
| 125 | + - [OneOfinlineResponse2001](docs/Model/OneOfinlineResponse2001.md) |
| 126 | + - [Order](docs/Model/Order.md) |
| 127 | + - [Parakeet](docs/Model/Parakeet.md) |
| 128 | + - [PartFour](docs/Model/PartFour.md) |
| 129 | + - [PartMaster](docs/Model/PartMaster.md) |
| 130 | + - [PartOne](docs/Model/PartOne.md) |
| 131 | + - [PartThree](docs/Model/PartThree.md) |
| 132 | + - [PartTwo](docs/Model/PartTwo.md) |
| 133 | + - [Pet](docs/Model/Pet.md) |
| 134 | + - [Pup](docs/Model/Pup.md) |
| 135 | + - [Tag](docs/Model/Tag.md) |
| 136 | + - [Test](docs/Model/Test.md) |
| 137 | + - [User](docs/Model/User.md) |
| 138 | + - [ValMemberChoice1](docs/Model/ValMemberChoice1.md) |
| 139 | + - [ValMemberChoice2](docs/Model/ValMemberChoice2.md) |
| 140 | + - [ValMembers](docs/Model/ValMembers.md) |
| 141 | + |
| 142 | +## Documentation For Authorization |
| 143 | + |
| 144 | + |
| 145 | +## api_key |
| 146 | + |
| 147 | +- **Type**: API key |
| 148 | +- **API key parameter name**: api_key |
| 149 | +- **Location**: HTTP header |
| 150 | + |
| 151 | +## bearer |
| 152 | + |
| 153 | +- **Type**: HTTP bearer authentication |
| 154 | + |
| 155 | +## petstore_auth |
| 156 | + |
| 157 | +- **Type**: OAuth |
| 158 | +- **Flow**: implicit |
| 159 | +- **Authorization URL**: http://petstore.swagger.io/oauth/dialog |
| 160 | +- **Scopes**: |
| 161 | + - ****: |
| 162 | + |
| 163 | + |
| 164 | +## Author |
| 165 | + |
| 166 | + |
| 167 | + |
0 commit comments