I want to measure the energy consumption of
on
If you really want to call the api's yourself I wouldn't know which one to call, but if you just want to know how the power consumption is while running certain applications you could use the acbPowerMeter application.
acbPowerMeter charts the real-time power usage of your device. This utility is very light-weight, allowing benchmarking of your battery usage.