API client package for R