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 cron job endpoints #18

Merged
merged 6 commits into from
Apr 18, 2024
Merged

feat: add cron job endpoints #18

merged 6 commits into from
Apr 18, 2024

Conversation

fabio-nettis
Copy link
Member

Description

Following the release v2.7.0 of the API we added new endpoints to the SDK. This introduces endpoints that alllow you to track the internal cron jobs, like the one that fetches the source data from Arrowhead's API:

const response = await Hellhub.crons("refresh_from_source");

This allows you to better fine tune your periodic requests to the API and prevent hitting request limits by eliminating the need for aimless overfetching.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added a new test for the generatePrimitiveRequestFn function that has been created to support requests to endpoints that do not support the default query parameters.

  • __tests__/utils/request-generator.ts

Test Configuration

  • Bun version: 1.1.3
  • API Hosting (Selfhosted, By Hellhub Collective, etc): By Hellhub Collective

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@fabio-nettis fabio-nettis added the enhancement New feature or request label Apr 18, 2024
Copy link

Thank you for contributing to the HellHub SDK fellow Helldiver! We try to keep our bundle size as small as possible, here you can see the impact of your pull request to the main bundle.

📦 Main 🚀 PR 📁 Generated Files
4 kB 4 kB index.mjs / index.d.ts

The difference between the current bundle and the one generated for your pull request is: 0 kB. Keep in mind that this is just an estimation and the actual difference might be smaller due to compression.

@fabio-nettis fabio-nettis merged commit 990a3fd into main Apr 18, 2024
4 checks passed
@fabio-nettis fabio-nettis deleted the feat/crons branch April 18, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant