Skip to content

Issue with paging in CanvasApiResult #1

@brianmullinsbsd

Description

@brianmullinsbsd

This may be a recent API change, but I'm not sure. Calls to CanvasApiResult are returning errors if there is only one page of data coming back. I think the issue is on line 78 of the CanvasApiMain.ps1:

if ($Results.Headers.link -ne $null) {

If I change the above to

if ($Results.Headers.link -ne $null -and $Results.Headers.link.contains("rel="next"") ) {

It seems to fix it, but I've only tested on one call.

BTW, this is freaking awesome. Until I found this I was building my own interfaces by hand. What a pain. Thanks man!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions