You don't need an api for that. You can do that with a 30 year old CRT if you wanted. Copy IR signals from remote. Put IR blaster in front of IR receiver. Make whatever tool you want to control the IR blaster. Done.