ResourceModel API

The ResourceModel is the main component to interaction with nap. While not intereacted with directly, subclasses of nap provide the functionality needed to working with APIs. Because of this, ResourceModel is designed to have as many hooks as possible to tweak the functionality of it’s primary method calls.


Main article: Fields

Each field is a one-to-one mapping with a attribute returned in your API’s response. It handles any validation and coerition (scrubbing) necessary to turn the API data into Python (and back to an API data string again). Special fields can be used to group API data into sub-collections of ResourceModels.

Lookup URLs

Main article: URLs

LookupURLs power the main engine of nap. By defining dynamic URLs, API get/create/update operations can be issued without specifying a raw URL, and instead the necessary data to complete the operation.

How LookupURLs work and


Main article: Options