Skip to content
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

Plugin API: renamed execute to search? #52

Closed
vutran opened this issue Sep 11, 2016 · 6 comments
Closed

Plugin API: renamed execute to search? #52

vutran opened this issue Sep 11, 2016 · 6 comments

Comments

@vutran
Copy link
Member

vutran commented Sep 11, 2016

A bit going back on my words (#11) but it may make more sense to renamed execute to search.

This would allow us to use execute in the future for executing a specific item.

Example would be something like this:

module.exports = {
  search: q => {
    items: [], // list of ietms
  },
  execute: item => {
    // executes for the selected item...
  },
};

This will be a breaking change but since it's still early, we should migrate and just alias/deprecate execute.

@adnasa
Copy link
Member

adnasa commented Sep 11, 2016

I think migrating execute to a targeted item is a good idea and I'm all for this! 👍

However, I don't agree that search is the right term here because I don't see dext only to be used for search purposes to different source, although that's what we do today and so far a is a good first step.

I would prefer query, because then it is ambiguous, generic and every plugin can interpret how they want to react to a query.

@adnasa
Copy link
Member

adnasa commented Sep 24, 2016

@vutran Changed this from discussion to enhancement, since I take that we proceed with this (?)

@vutran
Copy link
Member Author

vutran commented Sep 26, 2016

Yeah, we can proceed with this for next release.

@vutran vutran added this to the v0.6.0 milestone Sep 26, 2016
@adnasa
Copy link
Member

adnasa commented Oct 3, 2016

After looking further, I'm not sure whether this makes sense anymore if we let plugins execute their own item

@vutran
Copy link
Member Author

vutran commented Oct 3, 2016

execute currently returns/resolves an object of items. This is different from the actual execution of a single item. The goal of this issue was to allow query be our new endpoint to return these items and delegate execute for something else in the future.

@vutran
Copy link
Member Author

vutran commented Oct 3, 2016

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants