-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add collections related subcommands #3
Conversation
836cc8b
to
45de375
Compare
45de375
to
ed2b0ff
Compare
type GetCollectionResponse struct { | ||
*Collection | ||
Fields []struct { | ||
Id string |
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.
Does this need the json:"_id"
annotation?
Related q: what's the purpose of these annotations?
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.
This doesn't need the annotation because the field is just called id
. Go maps the struct property to the json field if they match but sometimes they don't (or can't like in this case) cause the field starts with _id
and this can't be an exported struct property so the annotation in the other examples is mapping struct.id
to the _id
json property.
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.
Works well in my testing
This PR adds collections related commands:
get
andlist
.webflow collections list [site_id]
webflow collections get [collection_id]
Builds on PR #2 so that needs to be merged first.