From d1ed660c666d152fcfeb6fc3663e0dc777bc5ccb Mon Sep 17 00:00:00 2001 From: Matthew Wade Date: Tue, 12 Mar 2024 10:31:35 +0000 Subject: [PATCH 1/3] Adds response format to RTS --- PKG-INFO | 2 +- pycronofy/__init__.py | 2 +- pycronofy/client.py | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/PKG-INFO b/PKG-INFO index 7076483..ead7f09 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: pycronofy -Version: 2.0.6 +Version: 2.0.7 Summary: Python wrapper for Cronofy Home-page: https://github.com/cronofy/pycronofy Author: VenueBook diff --git a/pycronofy/__init__.py b/pycronofy/__init__.py index 9385c96..ba4ab4a 100644 --- a/pycronofy/__init__.py +++ b/pycronofy/__init__.py @@ -1,6 +1,6 @@ from pycronofy.client import Client # noqa: F401 from pycronofy import settings -__version__ = '2.0.6' +__version__ = '2.0.7' __name__ = 'PyCronofy' """ diff --git a/pycronofy/client.py b/pycronofy/client.py index 743f691..cb7f0d8 100644 --- a/pycronofy/client.py +++ b/pycronofy/client.py @@ -649,6 +649,8 @@ def real_time_scheduling(self, :available_periods - A dict stating the available periods for the event :start_interval - A Integer representing the start_interval of the event :buffer - A dict representing the buffer for the event + :max_results - An Integer describing the maximum number of slots to calculate from the query (Optional) + :response_format - A String controlling the generation of available slots (Optional) :param dict oauth: - A dict describing the OAuth flow required: :scope - A String representing the scopes to ask for within the OAuth flow @@ -656,9 +658,8 @@ def real_time_scheduling(self, user to after completing the OAuth flow. :scope - A String representing additional state to be passed within the OAuth flow. - :max_results - An Integer describing the maximum number of slots to calculate from the query (Optional) :param dict event: - A dict describing the event - :param list target_calendars: - An list of dics stating into which calendars + :param list target_calendars: - A list of dictionaries stating into which calendars to insert the created event :param dict :minimum_notice - A dict describing the minimum notice for a booking (Optional) (DEPRECATED) :param string :callback_url - A String representing the URL Cronofy will notify @@ -696,6 +697,8 @@ def real_time_scheduling(self, options['available_periods'] = availability['available_periods'] if availability.get('max_results'): options['max_results'] = availability['max_results'] + if availability.get('response_format'): + options['response_format'] = availability['response_format'] args['availability'] = options From 18e657d002ed318bb7b3fb1b2c9b93b0c12cde01 Mon Sep 17 00:00:00 2001 From: Matthew Wade Date: Tue, 12 Mar 2024 10:32:50 +0000 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e8d1eb..507a2d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [2.0.7] +* Added support for the `response_format` parameter to the `real_time_scheduling` query API [#108] + ## [2.0.6] * Added support for the `max_results` parameter to the `real_time_scheduling` query API [#107] @@ -35,6 +38,7 @@ ## [1.9.3] * Add support for Element Token generation [#70] +[2.0.6]: https://github.com/cronofy/pycronofy/releases/tag/2.0.7 [2.0.6]: https://github.com/cronofy/pycronofy/releases/tag/2.0.6 [2.0.5]: https://github.com/cronofy/pycronofy/releases/tag/2.0.5 [2.0.4]: https://github.com/cronofy/pycronofy/releases/tag/2.0.4 @@ -47,6 +51,7 @@ [1.9.4]: https://github.com/cronofy/pycronofy/releases/tag/1.9.4 [1.9.3]: https://github.com/cronofy/pycronofy/releases/tag/1.9.3 +[#108]: https://github.com/cronofy/pycronofy/pull/108 [#107]: https://github.com/cronofy/pycronofy/pull/107 [#105]: https://github.com/cronofy/pycronofy/pull/105 [#104]: https://github.com/cronofy/pycronofy/pull/104 From b4c0819a7c242661a6c5086fd4ec2d5d845a903c Mon Sep 17 00:00:00 2001 From: Matthew Wade Date: Tue, 12 Mar 2024 10:33:15 +0000 Subject: [PATCH 3/3] Correct markdown --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 507a2d3..2cc266f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,7 +38,7 @@ ## [1.9.3] * Add support for Element Token generation [#70] -[2.0.6]: https://github.com/cronofy/pycronofy/releases/tag/2.0.7 +[2.0.7]: https://github.com/cronofy/pycronofy/releases/tag/2.0.7 [2.0.6]: https://github.com/cronofy/pycronofy/releases/tag/2.0.6 [2.0.5]: https://github.com/cronofy/pycronofy/releases/tag/2.0.5 [2.0.4]: https://github.com/cronofy/pycronofy/releases/tag/2.0.4