duffelhq / duffel-api-python

Python client library for the Duffel API
https://duffel.com/docs
MIT License
16 stars 7 forks source link

how do i add Query parameters? #211

Closed asafd11 closed 1 year ago

asafd11 commented 1 year ago

hello i create a python script for booking flights i am getting offers like this: ` offers_list =duffel.offer_requests.create().slices(slices).passengers([{"type": "adult"}]).return_offers().execute() id like to add query parameters for max connections and sort by total amount any idea how to add it to the offer requests?

https://duffel.com/docs/api/v1/offers/get-offers query parameters

`

nlopes commented 1 year ago

Hi @asafd11,

For max_connections you can just call it on offer_requests like so:

offers_list =duffel.offer_requests.create().slices(slices).passengers([{"type": "adult"}]).max_connections(1).return_offers().execute()

We don't yet offer sorting in the library I am afraid! I'll make an internal note of this.