(err, resources, nextPageRequest, response)
| 48 | // iteration over paginated results from the API. Each time you want to access the |
| 49 | // next page, the library retrieves that page from the API. |
| 50 | const listCallback = (err, resources, nextPageRequest, response) => { |
| 51 | if (err) { |
| 52 | console.error(err); |
| 53 | return; |
| 54 | } |
| 55 | |
| 56 | console.log(`Page ${pageNum}:`); |
| 57 | pageNum += 1; |
| 58 | |
| 59 | for (let i = 0; i < resources.length; i++) { |
| 60 | console.log(resources[i].name); |
| 61 | } |
| 62 | |
| 63 | if (response.nextPageToken) { |
| 64 | imagesClient.list(nextPageRequest, options, listCallback); |
| 65 | } |
| 66 | }; |
| 67 | |
| 68 | imagesClient.list(listRequest, options, listCallback); |
| 69 | } |
nothing calls this directly
no outgoing calls
no test coverage detected