Download the PHP package yiiman/apistorm without Composer
On this page you can find all versions of the php package yiiman/apistorm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yiiman/apistorm
More information about yiiman/apistorm
Files in yiiman/apistorm
Package apistorm
Short Description Create structured APIs and classified responses that can know by modern IDEs
License Apache-2.0
Informations about the package apistorm
apistorm
Create stractured APIs and classified responses that can know by modern IDEs
What is problem?
A big problem in most SDKs is input/output array|objects
For example you have a virtualizor api SDK!
In this SDK for use of every method you should read documents is virtualizor site
For example i want use addsrv
method:
This is dirty for an API method
You can use this api just after read API documents from their website everytime,because you dont know array parameters
Then you'll get an array after request from this method!!!
This is wrong and dirty to
What is apiStorm
?
apiStorm can classify your input/output arguments for every API method
By apiStorm
, every modern IDE can parse your input arguments and your output method data
You can validate data before send to API with apiStorm
What is different in apiStorm
This simple traditional API dataSend:
This is modern API with apiStorm:
In second example PHPStorm
can parse input/output
fileds like this:
Input Fields in PHPSTORM
:
Classified response in PHPSTORM
:
Install apiStorm
composer require yiiman/apistorm
OR
concept
Suggested strusture for standard SDK is like this:
Usage
First way
Clone project and check index.php file for full example you can execute index.php in console to see results:
composer install
php index.php
Second way
Step 1
Create new class for your SDK with name TestApi.php
:
We need a call method for our connections, then we need config an instant of ApiStorm
call
method inside our call method like this:
Use src/examples
directory to create new API SDK
Now we need some method for use call
for create connection in our TestApi.php
class like this:
Step 2
Credits
Special thanks to arianet Company
All versions of apistorm with dependencies
ext-json Version *
ext-curl Version *