StrongGrid icon indicating copy to clipboard operation
StrongGrid copied to clipboard

More Link-header paging

Open Jericho opened this issue 4 years ago • 1 comments

@kevinchalet recently alerted me to the fact that SendGrid includes "link" information in the response of the GlobalSuppressions.GetAllAsync which can be useful for pagination. While investigating this situation, I found out that there are other SendGrid API endpoints that also return this 'Link' information therefore it makes sense to modify StrongGrid so their corresponding methods include this information.

I asked SendGrid for their assistance figuring out the list of endpoints that return this information and I am waiting for a reply but in the mean time here is the list that I found.

  • [x] WebHooksSetting.GetAllInboundParseWebhookSettingsAsync GET user/webhooks/parse/settings
  • [x] Teammates.GetAllTeammatesAsync GET teammates
  • [x] Teammates.GetAllPendingInvitationsAsync GET teammates/pending
  • [x] SpamReports.GetAllAsync GET suppression/spam_reports
  • [x] SenderAuthentication.GetAllLinksAsync GET whitelabel/links
  • [x] SenderAuthentication.GetAllReverseDnsAsync GET whitelabel/ips
  • [x] SenderAuthentication.GetAllDomainsAsync GET whitelabel/domains
  • [x] IpAddresses.GetAllAsync GET ips
  • [x] ApiKeys.GetAll GET api_keys
  • [x] Blocks.GetAllAsync GET suppression/blocks
  • [x] InvalidEmails.GetAllAsync GET suppression/invalid_emails

Jericho avatar Jan 23 '21 15:01 Jericho

@kevinchalet, @jsgoupil Here's a new beta release which adds the "Links" paging information to several other methods: https://www.myget.org/feed/jericho/package/nuget/StrongGrid/0.77.0-paginated-respon0070

Please note that while investigating this issue, I found out that some endpoints support 'limit' and 'offset' despite the fact that SendGrid's documentation does not mention it. I'm sure there are more than just the ones I found though. See #368

Jericho avatar Jan 25 '21 18:01 Jericho