@@ -53,7 +53,7 @@ def demonstrate_basic_import(client: Client, grant_id: str) -> None:
5353 print ("\n Fetching events from primary calendar:" )
5454 events = client .events .list_import_events (
5555 identifier = grant_id ,
56- query_params = {"calendar_id" : "primary" , "max_results " : 2 }
56+ query_params = {"calendar_id" : "primary" , "limit " : 2 }
5757 )
5858 print_data (events .data , "Basic import events" )
5959
@@ -83,19 +83,19 @@ def demonstrate_time_filtered_import(client: Client, grant_id: str) -> None:
8383 print_data (events .data , f"Events from { from_date } to { to_date } " )
8484
8585
86- def demonstrate_max_results (client : Client , grant_id : str ) -> None :
87- """Demonstrate import events with max_results parameter."""
86+ def demonstrate_limit (client : Client , grant_id : str ) -> None :
87+ """Demonstrate import events with limit parameter."""
8888 print ("\n === Import Events with Max Results ===" )
8989
90- print ("\n Fetching events with max_results =5:" )
90+ print ("\n Fetching events with limit =5:" )
9191 events = client .events .list_import_events (
9292 identifier = grant_id ,
9393 query_params = {
9494 "calendar_id" : "primary" ,
95- "max_results " : 5
95+ "limit " : 5
9696 }
9797 )
98- print_data (events .data , "Events with max_results =5" )
98+ print_data (events .data , "Events with limit =5" )
9999
100100
101101def demonstrate_field_selection (client : Client , grant_id : str ) -> None :
@@ -107,7 +107,7 @@ def demonstrate_field_selection(client: Client, grant_id: str) -> None:
107107 identifier = grant_id ,
108108 query_params = {
109109 "calendar_id" : "primary" ,
110- "max_results " : 2 ,
110+ "limit " : 2 ,
111111 "select" : "id,title,when"
112112 }
113113 )
@@ -119,12 +119,12 @@ def demonstrate_pagination(client: Client, grant_id: str) -> None:
119119 print ("\n === Import Events with Pagination ===" )
120120
121121 # First page
122- print ("\n Fetching first page of events (max_results =3):" )
122+ print ("\n Fetching first page of events (limit =3):" )
123123 first_page = client .events .list_import_events (
124124 identifier = grant_id ,
125125 query_params = {
126126 "calendar_id" : "primary" ,
127- "max_results " : 3
127+ "limit " : 3
128128 }
129129 )
130130 print_data (first_page .data , "First page of events" )
@@ -136,7 +136,7 @@ def demonstrate_pagination(client: Client, grant_id: str) -> None:
136136 identifier = grant_id ,
137137 query_params = {
138138 "calendar_id" : "primary" ,
139- "max_results " : 3 ,
139+ "limit " : 3 ,
140140 "page_token" : first_page .next_cursor
141141 }
142142 )
@@ -159,7 +159,7 @@ def demonstrate_full_example(client: Client, grant_id: str) -> None:
159159 identifier = grant_id ,
160160 query_params = {
161161 "calendar_id" : "primary" ,
162- "max_results " : 10 ,
162+ "limit " : 10 ,
163163 "start" : int (start_of_year ),
164164 "end" : int (end_of_year ),
165165 "select" : "id,title,description,when,participants,location"
@@ -185,7 +185,7 @@ def main():
185185 # Demonstrate different ways to use list_import_events
186186 demonstrate_basic_import (client , grant_id )
187187 demonstrate_time_filtered_import (client , grant_id )
188- demonstrate_max_results (client , grant_id )
188+ demonstrate_limit (client , grant_id )
189189 demonstrate_field_selection (client , grant_id )
190190 demonstrate_pagination (client , grant_id )
191191 demonstrate_full_example (client , grant_id )
0 commit comments