How to write API code in arduino

The sensor is connected over I2C, so the API library implements register calls over I2C. You need to modify that library for Arduino (if the license allows it).