[minor] Added a resource API so you can access resources.