meilisearch-python icon indicating copy to clipboard operation
meilisearch-python copied to clipboard

API resource output as class to utilize dot notation for attributes

Open elamc-2 opened this issue 3 years ago • 2 comments

Pull Request

What does this PR do?

Fixes #508

PR checklist

Please check if your PR fulfills the following requirements:

  • [X] Does this PR fix an existing issue?
  • [X] Have you read the contributing guidelines?
  • [X] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

elamc-2 avatar Aug 07 '22 15:08 elamc-2

Thanks for the feedback @alallema. Just made a few changes

elamc-2 avatar Aug 08 '22 12:08 elamc-2

A note on the changes: document model allows for attributes to be accessed like document.title or document.poster. Class attributes are added based on keys from the dictionary that's passed in.

elamc-2 avatar Aug 12 '22 17:08 elamc-2

bors merge

alallema avatar Aug 22 '22 11:08 alallema