Skip to content

Releases: gadventures/gapipy

Build Release 2.42.0 (2026-02-19)

19 Feb 21:05
4c006b0

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.41.0...2.42.0

Build Release 2.41.0 (2025-12-02)

02 Dec 15:08

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.40.0...2.41.0

Build Release 2.40.0 (2025-11-06)

06 Nov 17:55

Choose a tag to compare

What's Changed

  • Field updates to the AcommodationDossier and ActivityDossier resources by @ammaar-gadv in #145
    • Breaking changes to dossier resources
      • Removed the costs and has_costs fields from both AccommodationDossier and ActivityDossier resources.
      • Moved the features field in AccommodationDossier from an as-is field to a model-collection-field, now referencing the DossierFeature resource.
      • Exposed the primary_country field on the ActivityDossier resource, referencing the Country resource.
  • [FIX: 110799b] revert the removal of deepcopy(data) in _fill_fields by @ammaar-gadv in #147

New Contributors

Full Changelog: 2.38.0...2.40.0

Release 2.38.0 (2025-05-29)

29 May 14:29

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.26.2...2.38.0

Release 2.26.2 (2020-04-20)

20 Apr 22:36

Choose a tag to compare

Fixes 2.26.1

  • #125 - Fix for Issue #113 & #123 release in 2.26.1

    from gapipy import Client
    g = Client(application_key="MY_API_KEY")
    
    g.tour_dossiers.get(24309).departures.count()
    # AttributeError: 'tuple' object has no attribute 'uri'

Removes the _set_resource_collection_field override from the TourDossier resource. This behaviour has been deprecated.

Release 2.26.1 (2020-04-20)

20 Apr 15:20

Choose a tag to compare

Pre-release

Fixes + Additions to 2.26.0

  • #123 - Fix for Issue #113
    • Calls to APIRequestor.list_raw will use its initialised parameters, unless the URI provides its own.
  • #124 - Add the ability to define the max_retries values on the requestor.
    • New env value GAPI_CLIENT_MAX_RETRIES.
    • The default value will be 0, and if provided will override the retry value on the requests.Session.
    • This change will also always initialize a requests.Session value on initialisation of the gapipy.Client.
  • edc8d9b - Add variation_id field to the Image resource.
  • bd35531 - Update the ActivityDossier and AccommodationDossier resources.
    • Remove the is_prepaid field.
    • Adds the has_costs field.

Release 2.26.0 (2020-04-14)

14 Apr 19:25

Choose a tag to compare

Pre-release

BREAKING CHANGES

  • The Query.filter method will return a clone/copy of itself. This will
    preserve the state of filters on the original Query object.
  • The Query.all method will not clear the filters after returning.
  • The Query.all method will return a TypeError if a type other than
    an int is passed to the limit argument.
  • The Query.count method will not clear the filters after returning.
  • see: #121

  • The AgencyChain.agencies field will be returned as a list of Resource objects
  • see: f34afd5

Release 2.24.0 (2019-11-05)

11 Nov 17:45

Choose a tag to compare

  • Add missing/new fields to resources
    • Accommodation Dossier: categories, suggested_dossiers, visited_countries, and visited_cities
    • Activity Dossier: suggested_dossiers, visited_countries, and visited_cities
    • Departure: local_payments
    • Itinerary: publish_state
    • See #117
  • Add continent and place references to the Countries resource
  • Accept additional_headers optional kwarg on create

Release 2.20.1 (2019-02-20) :: HISTORY.rst fixes

20 Feb 19:29

Choose a tag to compare

Release 2.20.0 (2019-02-20)

20 Feb 19:19

Choose a tag to compare

commits & PRs


changes

  • Defines two new private resources:

    1. RequirementSet: returned as a list via booking/{id}/requirements or queryable as individual objects

      • encapsulates a series of Requirements
      • listable via api.bookings.get(123456).requirements
    2. Requirement: found as individual components within a RequirementSet

      • not listable ... but can be found via a RequirementSet::requirements list
  • Moves the Checkin resource into the booking package

  • Modifies Query.all behaviour:

    • It will attempt to use an href value when available
    • This is done as bookings/{id}/requirements actually points
      to a list of RequirementSets

Requirements power G Adventures' Good-To-Go platform

Usage:

from gapipy import Client

api = Client(application_key='your_application_key')

# get a booking
booking = api.bookings.get(123456)  # <Booking: 123456>

# get the booking requirement sets
booking_requirements = list(booking.requirements)  # [<RequirementSet: AaBbCcDd (stub)>, ...]

# get the set of requirements for one of those sets, if any
some_requirements = booking_requirements[0].requirements  # [<Requirement: AbcDe12345XyZ (stub)>, ...]

# look at a single requirement
requirement = booking_requirements[0].requirements[0]  # <Requirement: AbcDe12345XyZ (stub)>

# get some requirement set directly
requirement_set = api.requirement_sets.get('AaBbCcDd')

# get some requirement directly
requirement  = api.requirements.get('AbcDe12345XyZ')

# print out the id, code, name for all requirements for all requirement_sets for some booking
for rs in booking.requirements:
    print(rs.id, rs.code, rs.name)
    for r in rs.requirements:
        print('\t', r.id, r.code, r.name)