-
Notifications
You must be signed in to change notification settings - Fork 11
Go SDK v0.3.0 #193
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
Go SDK v0.3.0 #193
Conversation
example/main.go
Outdated
} | ||
// [developer-docs.sdk.go.list-items]-end | ||
|
||
// [developer-docs.sdk.go.list-archived-items]-start |
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.
Can we call this snippet something like "using item list filters"? I think this is also what we should aim to name it in the docs, stating out that the filtering available today is by states.
internal/release/RELEASE-NOTES
Outdated
- **Support for item states**: You can now fetch an item's state using the SDK. `Item` and `ItemOverview` expose two states: `Active` and`Archived`. | ||
- `Active`: An item located inside a vault. (Default) | ||
- `Archived`: An item that has been moved to the Archive. 1Password doesn't include archived items in search results or suggest them when you fill in apps and browsers. You can keep archived items as long as you'd like. | ||
- **Filtering the return of item listing by state**: You can now filter the listed items by item state. The current exposed filter is `ByState`, which allows devs to filter `ItemOverviews` by their `State` . |
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 find this a bit abstract - who is "devs"?
Likely, the people reading this are also the people that use the SDK, so I'd rephrase this to something such as simply:
You can now filter the listed items by item state.
internal/release/RELEASE-NOTES
Outdated
- **Adding custom fields in sections automatically**: The SDK now automatically adds custom fields without a section to an empty section within the item, creating it if necessary. | ||
- **`Tags` in item overviews**: The return type of `Items().ListAll` now also contains the item tags. | ||
- **Broader item editing capabilities**: You are now able to use the `items.put` function on more items, including those with fields that are not directly editable through the SDK (such as legacy fields, passkeys etc.) | ||
- **Improved Deleting Capabilities:** You can now delete `Archived` items in the SDKs. |
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.
maybe even under FIXED?
Consider rephrasing to:
**Deleting Archived Items:** The SDK now supports deleting items from the archive.
As "improved deleting capabilities" loses some nuance:
- it does not reference items
- "improved" is redundant with the title of the section
internal/release/RELEASE-NOTES
Outdated
- When multiple sections match a section query in resolving secret references, the SDK look through the fields in all sections, instead of erroring. | ||
This release contains a breaking change for the Go SDK. | ||
|
||
`Items().ListAll()` has changed to `Items().List()` and below is how to migrate. |
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.
`Items().ListAll()` has changed to `Items().List()` and below is how to migrate. | |
`Items().ListAll()` has changed to `Items().List()`. To migrate to the latest SDK version: |
internal/release/RELEASE-NOTES
Outdated
|
||
`Items().ListAll()` has changed to `Items().List()` and below is how to migrate. | ||
|
||
Before: |
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 should mention explicitly the action that needs to be performed. Is it replacing? Is it deleting/adding code?
After: | ||
|
||
```go | ||
overviews, err := client.Items().List( |
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's make sure the indentation is similar between the two snippets, such that they are really replaceable.
internal/release/RELEASE-NOTES
Outdated
panic(err) | ||
} | ||
|
||
// To iterate through this you can do the following: |
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 should not be in the code that we recommend customers to copy paste. Consider breaking this down in two snippets if there are explanations we need to provide halfway through?
internal/release/RELEASE-NOTES
Outdated
`Vaults().ListAll()` has changed to `Vaults().List()` and the migration guide is below: | ||
|
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.
same comment as above
internal/release/RELEASE-NOTES
Outdated
``` | ||
`Vaults().ListAll()` has changed to `Vaults().List()` and the migration guide is below: | ||
|
||
Before: |
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.
same comment as above
internal/release/RELEASE-NOTES
Outdated
} | ||
``` | ||
|
||
* All functions that return an Iterator will now return the appropriate list type. |
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 is a bit misplaced here, as you ve already provided migration guides above. Consider either incorporating this in the points above or breaking down the migration guides for each point.
internal/release/RELEASE-NOTES
Outdated
|
||
* All functions that return an Iterator will now return the appropriate list type. | ||
|
||
This does not affect any code already deployed, and will not take effect in your codebase until you choose to update to v0.3.0+ of the 1Password Go SDK |
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 does not affect any code already deployed, and will not take effect in your codebase until you choose to update to v0.3.0+ of the 1Password Go SDK | |
This does not affect any code that's already deployed, and will not take effect in your codebase until updating to v0.3.0+ of the 1Password Go SDK. |
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.
Also, \n EOF please 🙏
This has been addressed in #194 |
No description provided.