# Class Power#getOnTimerList

Power

- Defined in: power.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Power#getOnTimerList(successCallback, errorCallback) Gets 'on timer' list.

## Class Detail

Power#getOnTimerList(successCallback, errorCallback)
Gets 'on timer' list.

    // Javascript code
    function getOnTimerList () {
      function successCb(cbObject) {
         var timerList = cbObject.timerList;
         for ( var i = 0; i < timerList.length; i++) {
            console.log("timerList[" + i + "] : " + JSON.stringify(timerList[i]));
            console.log("timerList[" + i + "].hour : " + timerList[i].hour);
            console.log("timerList[" + i + "].minute : " + timerList[i].minute);
            console.log("timerList[" + i + "].week : " + timerList[i].week);
            console.log("timerList[" + i + "].inputSource : " + timerList[i].inputSource);
         }

         // Do something
            ...
      }

      function failureCb(cbObject) {
         var errorCode = cbObject.errorCode;
         var errorText = cbObject.errorText;
         console.log ("Error Code [" + errorCode + "]: " + errorText);
      }

      var power = new Power();
      power.getOnTimerList(successCb, failureCb);
    }

Parameters:
{Function} successCallback
  success callback function.
{Function} errorCallback
  failure callback function.

Since:
  1.0
Returns:

  {Object} list of timer object.

  Property | Type | Description
  --- | --- | ---
  timerList[] | Array | An array with the timer information object as its elements.
  timerList[].hour | Number | hour (0~23)
  timerList[].minute | Number | minute (0~59)
  timerList[].week | Number | week Power.TimerWeek
  timerList[].inputSource | String | Input source

See:
  Power.setOnTimer()