lib/client/messages/custom-labels/index.js
function getAllCustomLabels () {
  return new Promise (async (resolve, reject) => {
    let options = {
      'qs': {'fields': 'id,name'}
    };
    
    try {
      let response = await  this.callCustomLabelsApi(options);
      resolve(response);
    } catch (e) {
      reject(e);
    }
  });
}
function getAllCustomLabels () {
  return new Promise (async (resolve, reject) => {
    let options = {
      'qs': {'fields': 'id,name'}
    };
    
    try {
      let response = await  this.callCustomLabelsApi(options);
      resolve(response);
    } catch (e) {
      reject(e);
    }
  });
}
function getAllCustomLabels ( ) { return new Promise ( async ( resolve , reject ) => { let options = { 'qs' : { 'fields' : 'id,name' } } ; try { let response = await this . callCustomLabelsApi ( options ) ; resolve ( response ) ; } catch ( e ) { reject ( e ) ; } } ) ; }
Retrieves the list of all custom labels.
@return {Promise<Object>}  The API response
@memberof  Client#
@example
let field = ['name', 'id']; //optional
Client.getAllCustomLabels(fields)
.then(res => {
console.log(res);
// {
//   "data": [
//     { "name": "myLabel", "id": "1001200005003"},
//     { "name": "myOtherLabel", "id": "1001200005002"}
//   ],
//   "paging": {
//     "cursors": {
//       "before": "QVFIUmx1WTBpMGpJWXprYzVYaVhabW55dVpyc",
//       "after": "QVFIUmItNkpTbjVzakxFWGRydzdaVUFNNnNPaU"
//     }
//   }
// }
});
Retrieves the list of all custom labels .