Code Monkey home page Code Monkey logo

Comments (6)

lipkau avatar lipkau commented on May 23, 2024

Other good sample:
https://github.com/PowerShell/PowerShell/blob/master/demos/rest/rest.ps1

from confluenceps.

JohnLBevan avatar JohnLBevan commented on May 23, 2024

Relating to SupportsPaging, I knocked up some PoC code to ensure I've understood how that should be implemented... https://codereview.stackexchange.com/questions/164252/powershell-supports-paging

We may also be able to make use of some of the logic from the Invoke-DummyRestMethod when writing related tests/mocks.

from confluenceps.

JohnLBevan avatar JohnLBevan commented on May 23, 2024

If the function's called without making use of the paging parameters; or if the page size is greater than the web service's supported page size, is there any preference on behaviour?

i.e. With SupportsPaging, the calling code needs to be aware of the page size, and to implement logic to loop through page by page if you want all results. If we want all results returned by a single call to the method, we want the function's internal code to loop through those pages. Would we still want to specify a page size for the function (i.e. which gets passed to the web service's limit parameter), or where we want all results would we not make use of the function's SupportsPaging, even though behind the scenes we are making paged calls to the web service?

from confluenceps.

lipkau avatar lipkau commented on May 23, 2024

If no stepsize is provided, use the systems default or leave the limit out.
If no paging parameter is provided, SupportPaging will still be active but not used.

from confluenceps.

lipkau avatar lipkau commented on May 23, 2024
  • We will return everything unless the SupportPaging parameters restrict it.
  • The StepSize will only influence the amount of results per call. Which is useful for slow connection and for | Select -First 10.
  • In order for the pipe to be able to terminate the calls, we are not allowed to collect the results in an array before writing to output.

from confluenceps.

lipkau avatar lipkau commented on May 23, 2024

my first attempt:
lipkau@157832d
brianbunke/ConfluencePS@develop...lipkau:feature/CmdLetPaging

from confluenceps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.