PHP code example of zahra-mapping / rose-test-sdk
1. Go to this page and download the library: Download zahra-mapping/rose-test-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zahra-mapping / rose-test-sdk example snippets
use SwaggerPetstoreLib\Environment;
use SwaggerPetstoreLib\Authentication\ApiKeyCredentialsBuilder;
use SwaggerPetstoreLib\Authentication\HttpBasicCredentialsBuilder;
use SwaggerPetstoreLib\Authentication\PetstoreAuthCredentialsBuilder;
use SwaggerPetstoreLib\Models\OAuthScopePetstoreAuthEnum;
use SwaggerPetstoreLib\SwaggerPetstoreClientBuilder;
$client = SwaggerPetstoreClientBuilder::init()
->apiKeyCredentials(
ApiKeyCredentialsBuilder::init(
'api_key'
)
)
->httpBasicCredentials(
HttpBasicCredentialsBuilder::init(
'username',
'passwprd'
)
)
->petstoreAuthCredentials(
PetstoreAuthCredentialsBuilder::init(
'OAuthClientId',
'OAuthRedirectUri'
)
->oAuthScopes(
[
OAuthScopePetstoreAuthEnum::READPETS,
OAuthScopePetstoreAuthEnum::WRITEPETS
]
)
)
->testHeader('TestHeaderDefaultValue')
->environment(Environment::PRODUCTION)
->build();