-
Notifications
You must be signed in to change notification settings - Fork 0
feat: initial Notehub CLI V2 #62
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
base: master
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| projectsRsp := ProjectsResponse{} | ||
| err := reqHubV1(GetVerbose(), GetAPIHub(), "GET", "/v1/projects", nil, &projectsRsp) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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!
No description provided.