jscarle / OnePassword.NET

A 1Password CLI Wrapper for .NET.
https://jscarle.github.io/OnePassword.NET/
MIT License
23 stars 8 forks source link

Incomplete API #68

Closed KairuDeibisu closed 7 months ago

KairuDeibisu commented 7 months ago

Given the ID of an item only,

I would like the ability to give a string of a item ID and retrieve that item directly without having to search for it.

The searching is causing my program to freeze for longer than it should because of the unnecessary requests going through each vault as I have a lot of vaults.

In other words, I'm looking for an item by ID method to be added as it's method that directly translates into a command in the CLI.

op item get item id

jscarle commented 7 months ago

Hello @KairuDeibisu,

Currently public Item SearchForItem(IItem item, IVault? vault = null, bool? includeArchive = null) is the overload that would accomplish what you're looking for.

However, I can understand that the fact that you much pass in an existing IItem may be impractical for your use case.

Would adding the following overload allow you to do what you'd like?

public Item SearchForItem(string itemId, IVault? vault = null, bool? includeArchive = null)

KairuDeibisu commented 7 months ago

Yes, that would be perfect.

P.S. I'm creating a plug-in for powertoys run for one password.

Got to make it quick to keep from freezing search.

jscarle commented 7 months ago

The new version has been published. Let me know if there's anything else.