Skip to content

Deprecate Index::add_api_key for Client::add_api_key#284

Closed
julienbourdeau wants to merge 1 commit intomasterfrom
fix/deprecate-index-add-keys
Closed

Deprecate Index::add_api_key for Client::add_api_key#284
julienbourdeau wants to merge 1 commit intomasterfrom
fix/deprecate-index-add-keys

Conversation

@julienbourdeau
Copy link

Same as algolia/algoliasearch-client-php#378

All keys should be managed using the Client class.

If you use the Index class, you'll attached the key to the index internally. They are not displayed in the dashboard and cannot be retrieve with client::list_api_keys. This is a deprecated feature, that shouldn't be used anymore.

Instead, you can create a key using client::add_api_key that will be attached to the Application internally. You can add restriction on the index to achieve the same behavior.

Other methods like get, update, delete, list are still required to access your existing keys.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.757% when pulling 3cf27ea on fix/deprecate-index-add-keys into 60aec1d on master.

1 similar comment
@coveralls
Copy link

coveralls commented Apr 11, 2018

Coverage Status

Coverage remained the same at 93.757% when pulling 3cf27ea on fix/deprecate-index-add-keys into 60aec1d on master.

@raphi
Copy link

raphi commented Apr 12, 2018

@julienbourdeau the goal here is just to mark it as deprecated in the doc right?

We could also add deprecation warnings whenever the method is called, WDYT?

@julienbourdeau
Copy link
Author

Yes, I checked the lib and it seems like the only thing we do so far for deprecation is to write it in the comment.

Also, we're reconsidering, and we'll probably depredcated all other method (like update, delete, get,...).

@raphi raphi self-requested a review April 12, 2018 12:09
@aseure
Copy link

aseure commented Apr 30, 2018

Closed in favor of #286

@aseure aseure closed this Apr 30, 2018
@aseure aseure deleted the fix/deprecate-index-add-keys branch April 30, 2018 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants