All URIs are relative to https://api.messente.com/v1
Method | HTTP request | Description |
---|---|---|
addToBlacklist | POST /phonebook/blacklist | |
fetchBlacklist | GET /phonebook/blacklist | |
isBlacklisted | GET /phonebook/blacklist/{phone_number} | |
removeFromBlacklist | DELETE /phonebook/blacklist/{phone_number} |
addToBlacklist(numberToBlacklist)
Adds a phone number to the blacklist.
var PhonebookApi = require('phonebook_api');
var defaultClient = PhonebookApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new PhonebookApi.BlacklistApi();
var numberToBlacklist = new PhonebookApi.NumberToBlacklist(); // NumberToBlacklist | Phone number to be blacklisted
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.addToBlacklist(numberToBlacklist, callback);
Name | Type | Description | Notes |
---|---|---|---|
numberToBlacklist | NumberToBlacklist | Phone number to be blacklisted |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
FetchBlacklistSuccess fetchBlacklist()
Returns all blacklisted phone numbers.
var PhonebookApi = require('phonebook_api');
var defaultClient = PhonebookApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new PhonebookApi.BlacklistApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.fetchBlacklist(callback);
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
isBlacklisted(phoneNumber)
Checks if a phone number is blacklisted.
var PhonebookApi = require('phonebook_api');
var defaultClient = PhonebookApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new PhonebookApi.BlacklistApi();
var phoneNumber = "phoneNumber_example"; // String | A phone number
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.isBlacklisted(phoneNumber, callback);
Name | Type | Description | Notes |
---|---|---|---|
phoneNumber | String | A phone number |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
removeFromBlacklist(phoneNumber)
Removes a phone number from the blacklist.
var PhonebookApi = require('phonebook_api');
var defaultClient = PhonebookApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new PhonebookApi.BlacklistApi();
var phoneNumber = "phoneNumber_example"; // String | A phone number
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.removeFromBlacklist(phoneNumber, callback);
Name | Type | Description | Notes |
---|---|---|---|
phoneNumber | String | A phone number |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json