-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add update filter for tasks #391
Add update filter for tasks #391
Conversation
@@ -50,16 +50,35 @@ | |||
expect(tasks['next']).to be_a(Integer) | |||
end | |||
|
|||
it 'filters tasks with index_uid/type/status' do | |||
tasks = client.tasks(index_uid: ['a-cool-index-name']) | |||
it 'filters tasks with index_uidx/typex/statuses' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended to have typex
instead of types
, and index_uidx
instead of index_uids
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it was a mistake, thanks for catching that! :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✨ 🦕
401: Update version for the next release (v0.21.0) r=brunoocasali a=brunoocasali This version makes this package compatible with Meilisearch v0.30.0 🎉 Check out the changelog of [Meilisearch v0.30.0](https://github.com/meilisearch/meilisearch/releases/tag/v0.30.0) for more information on the changes. ## 🚀 Enhancements - Add `MeilisearchClient#cancel_tasks` (#392) `@brunoocasali` - Add `MeilisearchClient#swap_indexes` (#393) `@brunoocasali` - Add `MeilisearchClient#delete_tasks` (#394) `@brunoocasali` - Add support to finite pagination by using `page` and `hits_per_page` like `index.search('', { page: 1, hits_per_page: 10 })` - Add filters for tasks resources (#391) `@brunoocasali` - `uids` filter parameter for `MeilisearchClient#get_tasks({ uids: [1, 2, 3] })` - `canceled_by` filter parameter for `MeilisearchClient#get_tasks({ canceled_by: [99, 100]})` - `before_enqueued_at` and `after_enqueued_at` filter parameter for `MeilisearchClient#get_tasks({ before_enqueued_at: DateTime.new(2022), after_enqueued_at: '2022-01-20' })` - `before_finished_at` and `after_finished_at` filter parameter for `MeilisearchClient#get_tasks({ before_finished_at: DateTime.new(2022), after_finished_at: '2022-01-20' })` - `before_started_at` and `after_started_at` filter parameter for `MeilisearchClient#get_tasks({ before_started_at: DateTime.new(2022), after_started_at: '2022-01-20' })` ##⚠️ Breaking Changes - Update filters for tasks resources (#391) `@brunoocasali` - `index_uid` query parameter is renamed `index_uids` when querying `MeilisearchClient#get_tasks` - `type` query parameter is renamed `types` when querying `MeilisearchClient#get_tasks` - `status` query parameter is renamed `statuses` when querying `MeilisearchClient#get_tasks` ## 💅 Misc * Fix broken CI after rubocop upgrade (#381) `@jonatanrdsantos` * Add new code-samples for matching_strategy (#384) `@thicolares` * Improve indexes names in tests (#385) `@thicolares` Thanks again to `@brunoocasali,` `@dibashthapa,` `@jonatanrdsantos,` and `@thicolares!` 🎉 Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
Add/Update filters for
/tasks
Add filters for this endpoint:
uids
filter. e.g/tasks?uids=1,2,3,4
canceledBy
filter. e.g/tasks?canceledBy=99,100
beforeEnqueuedAt
andafterEnqueuedAt
. e.g/tasks?afterEnqueuedAt=2022-01-20&beforeEnqueuedAt=2022-01-23
beforeStartedAt
andafterStartedAt
. e.g/tasks?afterStartedAt=2022-01-20&beforeStartedAt=2022-01-23
beforeFinishedAt
andafterFinishedAt
. e.g/tasks?afterFinishedAt=2022-01-20&beforeFinishedAt=2022-01-23
Rename filters and error codes for this endpoint:
indexUid
query parameter is renamedindexUids
type
query parameter is renamedtypes
status
query parameter is renamedstatuses