lib/client/messages/custom-labels/index.js
function deleteCustomLabel (label_id) {
  return new Promise (async (resolve, reject) => {
    if (!label_id) {
      reject('label_id required');
      return;
    }
    let options = {
      'method': 'DELETE',
      'path': '/' + label_id
    };

    try {
      let response = await  this.callCustomLabelsApi(options);
      resolve(response);
    } catch (e) {
      reject(e);
    }
  });
}
function deleteCustomLabel (label_id) {
  return new Promise (async (resolve, reject) => {
    if (!label_id) {
      reject('label_id required');
      return;
    }
    let options = {
      'method': 'DELETE',
      'path': '/' + label_id
    };

    try {
      let response = await  this.callCustomLabelsApi(options);
      resolve(response);
    } catch (e) {
      reject(e);
    }
  });
}
function deleteCustomLabel ( label_id ) { return new Promise ( async ( resolve , reject ) => { if ( ! label_id ) { reject ( 'label_id required' ) ; return ; } let options = { 'method' : 'DELETE' , 'path' : '/' + label_id } ; try { let response = await this . callCustomLabelsApi ( options ) ; resolve ( response ) ; } catch ( e ) { reject ( e ) ; } } ) ; }
Deletes a custom label.
@param  {Integer}  label_id  The ID of the custom label to delete.
@return {Promise<Object>}  The API response
@memberof  Client#
@example
Client.deleteCustomLabel(094730967209673)
.then(res => {
console.log(res); // {"success": true}
});
Deletes a custom label .