1Password / connect-sdk-python

Python SDK for 1Password Connect
https://developer.1password.com/docs/connect
MIT License
200 stars 31 forks source link

load_dict and load work with field id and label #50

Open volodymyrZotov opened 1 year ago

volodymyrZotov commented 1 year ago

Summary

Extend load_dict and load functions work with field.id and field.label. Currently, it works only with field.label.

"opfield": "section_name.field_id" # finds value by field_id

"opfield": "section_name.field_label" # finds value by field_label

Implement search flow in a next way:

  1. Try to find a field by provided string assuming it's a label (aka find by label). If found, great.
  2. If none is found, try to find a section by provided string assuming it's ID (aka find by id). If found, great.
  3. If none is found, throw the error.