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

Custom API Support #54

Merged
merged 4 commits into from
Jun 12, 2024
Merged

Custom API Support #54

merged 4 commits into from
Jun 12, 2024

Conversation

bh2smith
Copy link
Collaborator

@bh2smith bh2smith commented Jun 9, 2024

Adding Custom API class and field to DuneClient. There is a skipped test that does run when not ignored (but its specific to user name).

Sample usages was added to the README:

const { DUNE_API_KEY } = process.env;

const client = new DuneClient(DUNE_API_KEY ?? "");
const results = await client.custom.getResults({
  username: "your_username", 
  slug: "endpoint-slug"
  // optional arguments: see `GetResultParams`
  limit: 100,
});

@philippWassibauer
Copy link
Contributor

tested it locally, works.
We probably need to change the reference to username as it might be misleading for teams. Will come back on that and change if necessary

@bh2smith
Copy link
Collaborator Author

So is that an approval to merge? If so, can you click it?

We might also be able to fetch the user name from the query id with get query, but then the user would have to specify that and it might cost more credits.

@philippWassibauer
Copy link
Contributor

I added the small changes now. I can merge it. Maybe just have a last look over my changes

@bh2smith bh2smith merged commit 9c6fda9 into main Jun 12, 2024
3 checks passed
@bh2smith bh2smith deleted the custom-endpoints branch June 12, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants