René's URL Explorer Experiment


Title: Support pagination by thomasjm · Pull Request #503 · haskell-github/github · GitHub

Open Graph Title: Support pagination by thomasjm · Pull Request #503 · haskell-github/github

X Title: Support pagination by thomasjm · Pull Request #503 · haskell-github/github

Description: This PR is an attempt to support GitHub's pagination API. At present, this package allows you to construct a request with FetchCount, which has constructors FetchAtLeast Word and FetchAll. Both of these cause the library to repeatedly call the GitHub endpoint as many times as necessary to collect the desired number of items. This obscures the actual pagination API from the user. What if I want to fetch a specific page? And what if I want to access the Link header information returned by the GitHub API, to determine the total number of pages, next/last page links, etc.? This PR adds a new constructor to FetchCount called FetchPage PageParams. PageParams allows you to specify the page and/or perPage as integers, and you will get exactly the items you're asking for. This PR also exposes a function parsePageLinks, which you can use to extract the page links from an HTTP response. You can use it like this: mgr <- newManager tlsManagerSettings ret <- executeRequestWithMgrAndRes mgr auth $ issuesForRepoR owner repo mempty (GitHub.FetchPage (GitHub.PageParams (Just 2) (Just 1))) case ret of Left e -> expectationFailure . show $ e Right res -> do let issues = responseBody res let pageLinks = GitHub.parsePageLinks res putStrLn ("pageLinks: " ++ show pageLinks) I'd like to expose this in a nicer way at the higher levels of the API, like the github function. Maybe by providing a githubPaged version that returns the response value and also a PageLinks object. But this is serviceable enough for now. More API design suggestions are welcome!

Open Graph Description: This PR is an attempt to support GitHub's pagination API. At present, this package allows you to construct a request with FetchCount, which has constructors FetchAtLeast Word and FetchAll. Both...

X Description: This PR is an attempt to support GitHub&#39;s pagination API. At present, this package allows you to construct a request with FetchCount, which has constructors FetchAtLeast Word and FetchAll. ...

Opengraph URL: https://github.com/haskell-github/github/pull/503

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/checks(.:format)
route-controllerpull_requests
route-actionchecks
fetch-noncev2:da1d8a22-38d7-724b-ebe9-d61d535c4809
current-catalog-service-hash87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a
request-id9E48:10BDCB:40AE86C:59481EB:6977EC56
html-safe-nonce29b99229e43ba95625be5f1470f6b990f800beb2adc03979404274f51969b18e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTQ4OjEwQkRDQjo0MEFFODZDOjU5NDgxRUI6Njk3N0VDNTYiLCJ2aXNpdG9yX2lkIjoiNDQ2OTE2Mzg0NDA4MTAxOTk5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac091bf97e45591123b35e876062880231db409ca5a5bfc6db771c5be1d1f9b54b
hovercard-subject-tagpull_request:1746798242
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/checks
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/haskell-github/github/pull/503/checks
twitter:imagehttps://avatars.githubusercontent.com/u/1634990?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1634990?s=400&v=4
og:image:altThis PR is an attempt to support GitHub's pagination API. At present, this package allows you to construct a request with FetchCount, which has constructors FetchAtLeast Word and FetchAll. Both...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7eaaff248df7c1f4041c54b7590a56b5684599fefe7ab3647a01863fcc3f017a
turbo-cache-controlno-preview
go-importgithub.com/haskell-github/github git https://github.com/haskell-github/github.git
octolytics-dimension-user_id101745265
octolytics-dimension-user_loginhaskell-github
octolytics-dimension-repository_id2677437
octolytics-dimension-repository_nwohaskell-github/github
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id2677437
octolytics-dimension-repository_network_root_nwohaskell-github/github
turbo-body-classeslogged-out env-production page-responsive full-width full-width-p-0
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release25fe115ee1f8e1f2769ecde97c7c00c068519c2a
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/haskell-github/github/pull/503/checks#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhaskell-github%2Fgithub%2Fpull%2F503%2Fchecks
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhaskell-github%2Fgithub%2Fpull%2F503%2Fchecks
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fchecks&source=header-repo&source_repo=haskell-github%2Fgithub
Reloadhttps://patch-diff.githubusercontent.com/haskell-github/github/pull/503/checks
Reloadhttps://patch-diff.githubusercontent.com/haskell-github/github/pull/503/checks
Reloadhttps://patch-diff.githubusercontent.com/haskell-github/github/pull/503/checks
haskell-github https://patch-diff.githubusercontent.com/haskell-github
githubhttps://patch-diff.githubusercontent.com/haskell-github/github
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fhaskell-github%2Fgithub
Fork 194 https://patch-diff.githubusercontent.com/login?return_to=%2Fhaskell-github%2Fgithub
Star 437 https://patch-diff.githubusercontent.com/login?return_to=%2Fhaskell-github%2Fgithub
Code https://patch-diff.githubusercontent.com/haskell-github/github
Issues 37 https://patch-diff.githubusercontent.com/haskell-github/github/issues
Pull requests 7 https://patch-diff.githubusercontent.com/haskell-github/github/pulls
Actions https://patch-diff.githubusercontent.com/haskell-github/github/actions
Projects 0 https://patch-diff.githubusercontent.com/haskell-github/github/projects
Wiki https://patch-diff.githubusercontent.com/haskell-github/github/wiki
Security 0 https://patch-diff.githubusercontent.com/haskell-github/github/security
Insights https://patch-diff.githubusercontent.com/haskell-github/github/pulse
Code https://patch-diff.githubusercontent.com/haskell-github/github
Issues https://patch-diff.githubusercontent.com/haskell-github/github/issues
Pull requests https://patch-diff.githubusercontent.com/haskell-github/github/pulls
Actions https://patch-diff.githubusercontent.com/haskell-github/github/actions
Projects https://patch-diff.githubusercontent.com/haskell-github/github/projects
Wiki https://patch-diff.githubusercontent.com/haskell-github/github/wiki
Security https://patch-diff.githubusercontent.com/haskell-github/github/security
Insights https://patch-diff.githubusercontent.com/haskell-github/github/pulse
Sign up for GitHub https://patch-diff.githubusercontent.com/signup?return_to=%2Fhaskell-github%2Fgithub%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://patch-diff.githubusercontent.com/login?return_to=%2Fhaskell-github%2Fgithub%2Fissues%2Fnew%2Fchoose
andreasabelhttps://patch-diff.githubusercontent.com/andreasabel
haskell-github:masterhttps://patch-diff.githubusercontent.com/haskell-github/github/tree/master
codedownio:per-page-query-v2https://patch-diff.githubusercontent.com/codedownio/github/tree/per-page-query-v2
Conversation 1 https://patch-diff.githubusercontent.com/haskell-github/github/pull/503
Commits 11 https://patch-diff.githubusercontent.com/haskell-github/github/pull/503/commits
Checks 1 https://patch-diff.githubusercontent.com/haskell-github/github/pull/503/checks
Files changed https://patch-diff.githubusercontent.com/haskell-github/github/pull/503/files
Please reload this pagehttps://patch-diff.githubusercontent.com/haskell-github/github/pull/503/checks
Please reload this pagehttps://patch-diff.githubusercontent.com/haskell-github/github/pull/503/checks
Support pagination https://patch-diff.githubusercontent.com/haskell-github/github/pull/503/checks#top
Please reload this pagehttps://patch-diff.githubusercontent.com/haskell-github/github/pull/503/checks
Summary https://patch-diff.githubusercontent.com/haskell-github/github/pull/503/checks?check_run_id=41950345011
becoming a sponsorhttps://patch-diff.githubusercontent.com/sponsors/Mergifyio
documentationhttps://docs.mergify.com/
dashboardhttps://dashboard.mergify.com
https://mergify.comhttps://mergify.com
View more details on Mergify https://dashboard.mergify.com/event-logs?pullRequestNumber=503&login=haskell-github&repository=github
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.