Example code for hitting the API

Also, a fix for pagination