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

[WIP] Making it possible to add custom options #41

Open
wants to merge 57 commits into
base: master
Choose a base branch
from

Conversation

suhrawardi
Copy link

Hi,

I needed to add a custom option to query a Business Central endpoint. Of course I could use the raw query method, but that made me lose the query methods and entity object initialization.
I hacked the passing of the options dict, so now I can provide the additional options and keep using the nice query methods.

Service = ODataService(url, session=session, reflect_entities=True)
Supplier = Service.entities['Clients']
options = {'company': os.getenv('COMPANY')}
query = Service.query(Supplier, options=options)

Please let me know your thoughts about this. Is this useful for others? Feedback and ideas on how to improve this PR are very welcome.

Thx, Jarra

@suhrawardi suhrawardi force-pushed the master branch 2 times, most recently from 476a60c to 9241636 Compare June 24, 2020 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant