Limit, Since, Until parameters in lieu of real paging

Dec 30, 2011 at 2:23 PM

Since the "power" of PowerShell is its pipeline architecture but Facebook's Graph API has (apparently) "limits" to its "limit=n" value, may I suggest that the various FB-Getxxxxxxx functions allow for optional -Limit , -Since and -Until parameters in an attempt to bridge the apparent "impedance mismatch" between what Facebook's Graph API wants to do vs PowerShell's desire to permit pipelining of "all" results from a command to the next step in a pipeline?

It still means a lot of work to check for .next in the JSON results your raw "getter' returns, but maybe the first step is to implement the three new options mentioned above before diving head first into full-scale paging support?

Dec 31, 2011 at 3:41 PM

I agree -- unfortunately I'm pressed for time to get the current version in before I go on vacation. I think my first step will be to hard-code Limit to (say) 1000, then add new parameters in the next version. Since and Until will also have to wait.

I suspect that Facebook Graph API will not fully honor (say) "limit=100000", so we do need to get to paging eventually.

I am getting concerned about the number of parameters to the individual cmdlets. One popular approach is to move the less-popular parameters into a parameter object, which I might make just the Connection object. Thus:

Set-FBConnectionParameters -Limit $limit -Since $dateTimeSince -Until $dateTimeUntil

Thanks, Jon

Dec 31, 2011 at 4:38 PM

I could live with a separate Set-FBConnectionParameters command.

Eventually, I'd like to see Delete support, but understand why that and paging will have to wait.

Meanwhile, I'll see what the C# Facebook SDK can do for me until then.

Jan 1, 2012 at 12:00 AM

Limit default is 1000 in version 0.6.0