-
Notifications
You must be signed in to change notification settings - Fork 90
API resource output as class to utilize dot notation for attributes #513
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
Conversation
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.
Thanks, @ElamC for this PR ❤️
And well done you do a great job, the only feedback I have is my fault for not having detailed enough the outcome. On the naming, we decided with the team that all returns with results would be called such as: NameOfTheClassResults
.
e.g: DocumentsResults
, IndexesResults
, TaskResults
, KeysResults
.
So sorry for the naming
inconvenience.
Thanks for the feedback @alallema. Just made a few changes |
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.
Thanks for the modifications @ElamC 🔥 still a few changes 🚀
A note on the changes: document model allows for attributes to be accessed like |
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.
Thanks for all the additions @ElamC 🚀 ✨ few last requests
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.
Last revision the rest is perfect 🚀 just a few typos all titles are in snake_case, I don't know why but it's just to keep some consistency between all files.
Thanks again @ElamC
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.
Thank you so much @ElamC for this PR ❤️ 🔥 🔥 🔥
LGTM!
bors merge |
533: Update version for the next release (v0.20.0) r=brunoocasali a=alallema Update to the next version **Note:** This release is a replacement for the v0.19.2 which should be a minor update instead of a patch update. https://github.com/meilisearch/meilisearch-python/releases/tag/v0.19.2 ## 💥 Breaking changes * API resource output as class to utilize dot notation for attributes (#513) `@ElamC` * `Document`, `Index` and `Task` are now class and the attributes of these classes are now accessible via dot notation: * `document.offset`, `document.limit`, `document.total` * `task.uid`, `task.duration`, `task.status` ... * Add pipenv install in the CONTRIBUTING guide (#519) `@brunoocasali` * Bump mako from 1.2.1 to 1.2.2 due to security issue (#528) Thanks again to `@ElamC,` `@alallema,` `@brunoocasali!` 🎉 Co-authored-by: alallema <[email protected]>
Pull Request
What does this PR do?
Fixes #508
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!