Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Paging with REST::Client?

by 1nickt (Canon)
on Jan 13, 2020 at 17:16 UTC ( [id://11111362]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Paging with REST::Client?
in thread Paging with REST::Client?

Hi try adding &page=2


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^4: Paging with REST::Client?
by Argel (Prior) on Jan 13, 2020 at 17:25 UTC
    Sorry, I should have been clear -- that's an example from my old Curl code. REST::Client isn't doing any of the paging.

    Elda Taluta; Sarks Sark; Ark Arks
    My deviantART gallery

      Umm, right. Rest::Client does not do any paging. You said that it's on the server. So that means that you will have to provide the parameters or headers necessary to Rest::Client in the call it makes, and write a wrapper that collates the results from the various requests.

      What does the documentation of the API you are calling say about paging?


      The way forward always starts with a minimal test.
        The only documentation is an example in an appendix. I've used it with with Perl code shelling out to Curl, so I can go back to it if necessary. But that was really ugly code and I don't have time to write something prettier. I was really hoping this came up enough that an existing module supported it, or e.g. that LWP::UserAgent had the hooks in it to add support for it. Sort of like how XML::Twig has an option to iterate over large XML files.

        It seems like the easiest approach may be to see if I can tell that there was an error because of too much data, and if so, I can assume a restart is needed. Thanks for the help!

        Elda Taluta; Sarks Sark; Ark Arks
        My deviantART gallery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11111362]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found