def test_get_pagnation_resources(self): map = Mapillary(API_KEY) page_num = 1 per_page = 1 raw_json = map.get_pagnation_resources(page_num=page_num, per_page=per_page) # Since the page can change, I just check if a request just went through features_json = raw_json['features'] self.assertEqual(type([]), type(features_json))
#!/usr/bin/env python # -*- coding: utf-8 -*- # This sample code gets a number of resources requested. from pymapillary import Mapillary from pymapillary.utils import * page_num = 1 # What page you want per_page = 1 # Results per page map = Mapillary("insert client id here") raw_json = map.get_pagnation_resources(1, 1) print(raw_json) # Download the beautified json for debugging return_json_file(raw_json, "../sample_json_output/get_pagnation_resources_example.json")