Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Add support for app name in user agent, and some defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
lornajane authored and mheap committed May 16, 2019
1 parent 98cdca5 commit babd691
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions config/nexmo.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,16 @@
'private_key' => function_exists('env') ? env('NEXMO_PRIVATE_KEY', '') : '',
'application_id' => function_exists('env') ? env('NEXMO_APPLICATION_ID', '') : '',

/*
|--------------------------------------------------------------------------
| Application Identifiers
|--------------------------------------------------------------------------
|
| Add an application name and version here to identify your application when
| making API calls
|
*/

'app' => ['name' => function_exists('env') ? env('NEXMO_APP_NAME', 'NexmoLaravel') : 'NexmoLaravel',
'version' => function_exists('env') ? env('NEXMO_APP_VERSION', '1.1.2') : '1.1.2']
];
2 changes: 1 addition & 1 deletion src/NexmoServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected function createNexmoClient(Config $config)
}

// Get Client Options.
$options = array_diff_key($config->get('nexmo'), ['private_key', 'application_id', 'api_key', 'api_secret', 'shared_secret']);
$options = array_diff_key($config->get('nexmo'), ['private_key', 'application_id', 'api_key', 'api_secret', 'shared_secret', 'app']);

// Do we have a private key?
$privateKeyCredentials = null;
Expand Down

0 comments on commit babd691

Please sign in to comment.