Skip to content

Conversation

@Bucknalla
Copy link
Collaborator

No description provided.

@Bucknalla Bucknalla marked this pull request as draft December 5, 2025 11:29
}

projectsRsp := ProjectsResponse{}
err := reqHubV1(GetVerbose(), GetAPIHub(), "GET", "/v1/projects", nil, &projectsRsp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should consider using the Notehub Golang SDK instead of essentially rewriting it by hand. It'll be a LOT less code and have better compile-time checks

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottfrazer I was planning on this but I believe it's private to the hub repo? I'm happy to change over to using it otherwise

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, instead of duplicating the Project and ProjectResponse objects and having to do the HTTP request, we could do:

projects, httpResp, err := sdk.ProjectAPI.
		GetProjects(ctx).
		Execute()

This SDK is automatically generated from the OpenAPI spec

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is private currently. We need to develop a process to publish it (like we for the JavaScript SDK). So far we haven't done it simply because there wasn't a specific need for it since we only use the SDK internally right now

But there's no reason why it shouldn't be public!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know when you have a mechanism to publish it, and I'll change over to use it! Looking forward to it!

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.

3 participants