Skip to content

Latest commit

 

History

History
196 lines (141 loc) · 4.98 KB

File metadata and controls

196 lines (141 loc) · 4.98 KB

MessenteApi.BlacklistApi

All URIs are relative to https://api.messente.com/v1

Method HTTP request Description
addToBlacklist POST /phonebook/blacklist Adds a phone number to the blacklist
deleteFromBlacklist DELETE /phonebook/blacklist/{phone} Deletes a phone number from the blacklist
fetchBlacklist GET /phonebook/blacklist Returns all blacklisted phone numbers
isBlacklisted GET /phonebook/blacklist/{phone} Checks if a phone number is blacklisted

addToBlacklist

addToBlacklist(number_to_blacklist)

Adds a phone number to the blacklist

Example

var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new MessenteApi.BlacklistApi();
var number_to_blacklist = {"phoneNumber":"+37251000000"}; // 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(number_to_blacklist, callback);

Parameters

Name Type Description Notes
number_to_blacklist NumberToBlacklist Phone number to be blacklisted

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteFromBlacklist

deleteFromBlacklist(phone)

Deletes a phone number from the blacklist

Example

var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new MessenteApi.BlacklistApi();
var phone = +37251000000; // String | A phone number
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteFromBlacklist(phone, callback);

Parameters

Name Type Description Notes
phone String A phone number

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

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

fetchBlacklist

FetchBlacklistSuccess fetchBlacklist()

Returns all blacklisted phone numbers

Example

var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new MessenteApi.BlacklistApi();
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.fetchBlacklist(callback);

Parameters

This endpoint does not need any parameter.

Return type

FetchBlacklistSuccess

Authorization

basicAuth

HTTP request headers

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

isBlacklisted

isBlacklisted(phone)

Checks if a phone number is blacklisted

Example

var MessenteApi = require('messente_api');
var defaultClient = MessenteApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

var apiInstance = new MessenteApi.BlacklistApi();
var phone = +37251000000; // String | A phone number
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.isBlacklisted(phone, callback);

Parameters

Name Type Description Notes
phone String A phone number

Return type

null (empty response body)

Authorization

basicAuth

HTTP request headers

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