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

Refactor into a library #32

Open
zexa opened this issue Mar 10, 2023 · 5 comments
Open

Refactor into a library #32

zexa opened this issue Mar 10, 2023 · 5 comments

Comments

@zexa
Copy link

zexa commented Mar 10, 2023

I'd like to use hq in one of my personal rust projects, but I don't want to use the binary.

Could we refactor hq into a library and make the binary use that lib instead?

@orf
Copy link
Owner

orf commented Mar 10, 2023

That's a great idea - I don't have time to work on it right now, but when I next get round to making changes to this project I will give it a go.

Can you describe what kind of interface you'd like for the library?

@zexa
Copy link
Author

zexa commented Mar 10, 2023

I'd love to have something like a pub fn hq(query: impl ToString, text: impl ToString) -> Result<serde_json::Value, HqError>

@zexa
Copy link
Author

zexa commented Mar 22, 2023

I was having more thoughts about this and figured I'd also love to have pub fn validate_query(query: impl ToString) -> Result<(), HqError>

@magick93
Copy link

magick93 commented Mar 8, 2024

Agree, would love to see this as a library.

@orf
Copy link
Owner

orf commented Mar 9, 2024

Yep! This is my next project to show some love to. I’m going to be making this into a library, changing a few things around and making it a bit more easy to use.

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

No branches or pull requests

3 participants