Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Commit

Permalink
0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Räni authored Jan 10, 2019
2 parents 4aa4cb2 + 426bde5 commit fdb3d75
Show file tree
Hide file tree
Showing 16 changed files with 348 additions and 37 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ try {
// echo 'Exception when calling addToBlacklist: ', $e->getMessage(), PHP_EOL;
// }

// try {
// $apiInstance->isBlacklisted('+37255555555');
// } catch (Exception $e) {
// echo 'Exception when calling isBlacklisted: ', $e->getMessage(), PHP_EOL;
// }


// try {
// $apiInstance->removeFromBlacklist('+37255555555');
// } catch (Exception $e) {
Expand All @@ -96,6 +103,7 @@ Class | Method | HTTP request |
------------ | ------------- | ------------- |
*BlacklistApi* | [**addToBlacklist**](docs/Api/BlacklistApi.md#addtoblacklist) | **POST** /phonebook/blacklist |
*BlacklistApi* | [**fetchBlacklist**](docs/Api/BlacklistApi.md#fetchblacklist) | **GET** /phonebook/blacklist |
*BlacklistApi* | [**isBlacklisted**](docs/Api/BlacklistApi.md#isBlacklisted) | **GET** /phonebook/blacklist/{phone_number} |
*BlacklistApi* | [**removeFromBlacklist**](docs/Api/BlacklistApi.md#removefromblacklist) | **DELETE** /phonebook/blacklist/{phone_number} |


Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "messente/messente-phonebook-php",
"version": "0.1.0",
"description": "",
"version": "0.2.0",
"description": "RESTful API for Messente phonebook",
"keywords": [
"openapitools",
"openapi-generator",
Expand Down
59 changes: 57 additions & 2 deletions docs/Api/BlacklistApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**addToBlacklist**](BlacklistApi.md#addToBlacklist) | **POST** /phonebook/blacklist |
[**fetchBlacklist**](BlacklistApi.md#fetchBlacklist) | **GET** /phonebook/blacklist |
[**isBlacklisted**](BlacklistApi.md#isBlacklisted) | **GET** /phonebook/blacklist/{phone_number} |
[**removeFromBlacklist**](BlacklistApi.md#removeFromBlacklist) | **DELETE** /phonebook/blacklist/{phone_number} |


Expand Down Expand Up @@ -114,6 +115,60 @@ This endpoint does not need any parameter.

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **isBlacklisted**
> isBlacklisted($phoneNumber)


Checks if a phone number is blacklisted.

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$apiInstance = new Messente\Phonebook\Api\BlacklistApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$phoneNumber = 'phoneNumber_example'; // string | A phone number

try {
$apiInstance->isBlacklisted($phoneNumber);
} catch (Exception $e) {
echo 'Exception when calling BlacklistApi->isBlacklisted: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**phoneNumber** | **string**| A phone number |

### Return type

void (empty response body)

### Authorization

[basicAuth](../../README.md#basicAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **removeFromBlacklist**
> removeFromBlacklist($phoneNumber)
Expand All @@ -137,7 +192,7 @@ $apiInstance = new Messente\Phonebook\Api\BlacklistApi(
new GuzzleHttp\Client(),
$config
);
$phoneNumber = 'phoneNumber_example'; // string | The phone number to be deleted
$phoneNumber = 'phoneNumber_example'; // string | A phone number

try {
$apiInstance->removeFromBlacklist($phoneNumber);
Expand All @@ -151,7 +206,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**phoneNumber** | **string**| The phone number to be deleted |
**phoneNumber** | **string**| A phone number |

### Return type

Expand Down
2 changes: 1 addition & 1 deletion gen-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"artifactVersion": "0.1.0",
"artifactVersion": "0.2.0",
"variableNamingConvention": "camelCase",
"gitRepoId": "messente-phonebook-php",
"gitUserId": "messente",
Expand Down
Loading

0 comments on commit fdb3d75

Please sign in to comment.