Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add experimental support for normalized responses #53

Merged
merged 14 commits into from
Sep 6, 2024

Conversation

ghostrider-05
Copy link
Owner

@ghostrider-05 ghostrider-05 commented Jul 4, 2024

  • The functions simplifyFromQuery and normalizeFromQuery will perform the same transformations as mentioned below but are typed based on the query to give the output type.

Adds two new response types:

normalize:

  • flattens all attributes, included and relationship fields to one object.
  • Exposed on the client with <Client>.normalized

simplify:

  • Will return the same as normalize with camelCase keys
  • Expose on the client with <Client>.simplified

Changes this PR makes

  • fix(PatreonOauthClient): remove undefined from return types
  • fix(PatreonOauthClient): correctly use cursor for paginating
  • feat(rest): add timeout option to client

@ghostrider-05 ghostrider-05 added this to the v0.7.0 milestone Jul 4, 2024
@github-actions github-actions bot added the oauth Oauth2 for Patreon API label Jul 4, 2024
@ghostrider-05 ghostrider-05 added the feature request New feature or request label Jul 4, 2024
Copy link

cloudflare-workers-and-pages bot commented Jul 7, 2024

Deploying patreon-api with  Cloudflare Pages  Cloudflare Pages

Latest commit: ac3f5c9
Status: ✅  Deploy successful!
Preview URL: https://a793b729.patreon-api.pages.dev
Branch Preview URL: https://feat-normalized.patreon-api.pages.dev

View logs

@github-actions github-actions bot added the test label Sep 6, 2024
@ghostrider-05 ghostrider-05 changed the title feat: add normalized responses feat: add experimental support for normalized responses Sep 6, 2024
@ghostrider-05 ghostrider-05 marked this pull request as ready for review September 6, 2024 15:11
@ghostrider-05 ghostrider-05 merged commit 242587d into main Sep 6, 2024
7 checks passed
@ghostrider-05 ghostrider-05 deleted the feat/normalized branch September 6, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request oauth Oauth2 for Patreon API test
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant