Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Paging with REST::Client?

by Anonymous Monk
on Jan 14, 2020 at 01:06 UTC ( [id://11111388]=note: print w/replies, xml ) Need Help??


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

I'm not an expert on RESTful APIs, so I'm not sure what specifically is supplying the functionality, but it's on the server side of things. It's something passed in via the URL. Here's an example URL from some debug output I have lying around:

Hi

;) Have you read what you wrote?

Surely you know exactly the actions you took, cause you say

"passed in via URL"

Well, there you go, the module does accepts URLs https://metacpan.org/pod/REST::Client#GET-(-$url,-%5B%25$headers%5D-)

So what happened when you did that (pass via url)?

"paging" ain't nothing but a loop (foreach) where you ask for some more

Replies are listed 'Best First'.
Re^4: Paging with REST::Client?
by Argel (Prior) on Jan 14, 2020 at 23:08 UTC
    In theory I could pass in the paging parameters and see what REST::Client does with it, but I was hoping it supported it so it could be transparent to me -- i.e. just keep puling in thew data behind the scenes for me. Otherwise, it's back to some ugly code to deal with it. Maybe I can handle it slightly better than my Curl based scripts, but it adds a lot of complexity to the code just to handle something that feels like it should be part of the feature set of the module (e.g. a ->next function, or the abiltiy to tell it to slurp everything in).

    The "don't know" part -- I know the server side is handling the paging, but not sure what specifically is handling it (module in the web server, some process the WAPI calls are passed to, etc.).

    Elda Taluta; Sarks Sark; Ark Arks
    My deviantART gallery

      In theory I could pass in the paging parameters and see what REST::Client does with it, but I was hoping it supported it so it could be transparent to me -- i.e. just keep puling in thew data behind the scenes for me. Otherwise, it's back to some ugly code to deal with it. Maybe I can handle it slightly better than my Curl based scripts, but it adds a lot of complexity to the code just to handle something that feels like it should be part of the feature set of the module (e.g. a ->next function, or the abiltiy to tell it to slurp everything in).

      I suggest you read REST to see what it actually is.

      Same for REST::Client

      The "don't know" part -- I know the server side is handling the paging, but not sure what specifically is handling it (module in the web server, some process the WAPI calls are passed to, etc.).

      Is that like, I know gas gets gas delivered, but I dont know which refinery or how its delivered exactly?

      That is a baffling response to being asked which gas station.

        can you make your responses more CO2-neutral? hehehe

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-28 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found