hyperoslo / Keychains

:key: A keychain wrapper that is so easy to use that your cat could use it.
Other
75 stars 6 forks source link

Public API #2

Closed zenangst closed 8 years ago

zenangst commented 8 years ago

I've been thinking about the public API, does it have to reference the pod name or could we call the main struct Keychain instead to make it more implicit to what it actually does?

So instead of;

Stash.password(service, account: account)

We would get

Keychain.password(service, account: account)

Also, maybe the service should be the second argument and have it default to the application bundle identifier so that you don't have to set it.

Keychain.password(forAccount: account)

What do you guys think? @RamonGilabert @vadymmarkov @attila-at-hyper

zenangst commented 8 years ago

I kinda like how the last function call reads. It is very readable and describes its intent.

RamonGilabert commented 8 years ago

It is actually free in Cocoapods, don't understand why. :smile: but yes, I agree, Keychain makes more sense. It's clearer.

zenangst commented 8 years ago

My vote is on Keychain, what about you @vadymmarkov ?

vadymmarkov commented 8 years ago

+1 for Keychain

vadymmarkov commented 8 years ago

And default service is also a good idea.

zenangst commented 8 years ago

@vadymmarkov @RamonGilabert made a pull request :grin:

RamonGilabert commented 8 years ago

Closing as #3 is merged.