Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ concurrency:

env:
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }}
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }}
BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }}
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ concurrency:
cancel-in-progress: true

env:
BW_USERNAME: ${{ secrets.BW_USERNAME }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }}
BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }}
USER_NUMBER: ${{ secrets.USER_NUMBER }}
Expand Down
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,10 @@ Please follow the [installation procedure](#installation--usage) and then run th
require_once(__DIR__ . '/vendor/autoload.php');



// Configure HTTP basic authorization: Basic
// Configure OAuth2 client credentials; access tokens are fetched and refreshed automatically
$config = Bandwidth\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');

// Configure OAuth2 access token for authorization: OAuth2
$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

->setClientId('YOUR_CLIENT_ID')
->setClientSecret('YOUR_CLIENT_SECRET');

$apiInstance = new Bandwidth\Api\CallsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
Expand Down Expand Up @@ -333,11 +328,6 @@ Class | Method | HTTP request | Description

## Authorization

### Basic

- **Type**: HTTP basic authentication


### OAuth2

- **Type**: `OAuth`
Expand Down
157 changes: 60 additions & 97 deletions bandwidth.yml

Large diffs are not rendered by default.

60 changes: 0 additions & 60 deletions custom_templates/Configuration.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,6 @@ class Configuration
*/
protected string $booleanFormatForQueryString = self::BOOLEAN_FORMAT_INT;

/**
* Username for HTTP basic authentication
*
* @var string
*/
protected string $username = '';

/**
* Password for HTTP basic authentication
*
* @var string
*/
protected string $password = '';

/**
* The host
*
Expand Down Expand Up @@ -390,52 +376,6 @@ class Configuration
return $this->booleanFormatForQueryString;
}

/**
* Sets the username for HTTP basic authentication
*
* @param string $username Username for HTTP basic authentication
*
* @return $this
*/
public function setUsername(string $username): static
{
$this->username = $username;
return $this;
}

/**
* Gets the username for HTTP basic authentication
*
* @return string Username for HTTP basic authentication
*/
public function getUsername(): string
{
return $this->username;
}

/**
* Sets the password for HTTP basic authentication
*
* @param string $password Password for HTTP basic authentication
*
* @return $this
*/
public function setPassword(string $password): static
{
$this->password = $password;
return $this;
}

/**
* Gets the password for HTTP basic authentication
*
* @return string Password for HTTP basic authentication
*/
public function getPassword(): string
{
return $this->password;
}

/**
* Sets the host
*
Expand Down
5 changes: 4 additions & 1 deletion custom_templates/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ Please follow the [installation procedure](#installation--usage) and then run th
require_once(__DIR__ . '/vendor/autoload.php');

{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}
{{> php_doc_auth_partial}}
// Configure OAuth2 client credentials; access tokens are fetched and refreshed automatically
$config = {{{invokerPackage}}}\Configuration::getDefaultConfiguration()
->setClientId('YOUR_CLIENT_ID')
->setClientSecret('YOUR_CLIENT_SECRET');

$apiInstance = new {{invokerPackage}}\Api\{{classname}}(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
Expand Down
35 changes: 5 additions & 30 deletions docs/Api/CallsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ Creates an outbound phone call. All calls are initially queued. Your outbound c
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: Basic
$config = Bandwidth\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');

// Configure OAuth2 access token for authorization: OAuth2
$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

Expand Down Expand Up @@ -74,7 +69,7 @@ try {

### Authorization

[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2)
[OAuth2](../../README.md#OAuth2)

### HTTP request headers

Expand Down Expand Up @@ -103,11 +98,6 @@ Retrieve the current state of a specific call. This information is near-realtime
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: Basic
$config = Bandwidth\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');

// Configure OAuth2 access token for authorization: OAuth2
$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

Expand Down Expand Up @@ -148,7 +138,7 @@ try {

### Authorization

[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2)
[OAuth2](../../README.md#OAuth2)

### HTTP request headers

Expand Down Expand Up @@ -177,11 +167,6 @@ Returns a max of 10000 calls, sorted by `createdTime` from oldest to newest. **
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: Basic
$config = Bandwidth\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');

// Configure OAuth2 access token for authorization: OAuth2
$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

Expand Down Expand Up @@ -234,7 +219,7 @@ try {

### Authorization

[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2)
[OAuth2](../../README.md#OAuth2)

### HTTP request headers

Expand Down Expand Up @@ -263,11 +248,6 @@ Interrupts and redirects a call to a different URL that should return a BXML doc
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: Basic
$config = Bandwidth\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');

// Configure OAuth2 access token for authorization: OAuth2
$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

Expand Down Expand Up @@ -309,7 +289,7 @@ void (empty response body)

### Authorization

[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2)
[OAuth2](../../README.md#OAuth2)

### HTTP request headers

Expand Down Expand Up @@ -338,11 +318,6 @@ Interrupts and replaces an active call's BXML document.
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: Basic
$config = Bandwidth\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');

// Configure OAuth2 access token for authorization: OAuth2
$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

Expand Down Expand Up @@ -387,7 +362,7 @@ void (empty response body)

### Authorization

[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2)
[OAuth2](../../README.md#OAuth2)

### HTTP request headers

Expand Down
Loading
Loading