@@ -102,6 +102,38 @@ def get_tasks_by_tags(self, tags, limit=10, page=0):
102102 )
103103 return response
104104
105+ def get_tasks_by_bounding_box (self , left , bottom , right , top , limit = 10000 , page = 0 , exclude_locked = "false" ,
106+ order = "ASC" , include_total = "false" , include_geometries = "false" , include_tags = "false" ):
107+ """Method to retrieve tasks by a bounding box defined by left, bottom, right, and top lat/long values
108+
109+ :param left: the minimum latitude of the bounding box
110+ :param bottom: the minimum longitude of the bounding box
111+ :param right: the maximum latitude of the bounding box
112+ :param top: the maximum longitude of the bounding box
113+ :param limit: the limit to the number of results returned in the response. Default is 10,000.
114+ :param page: used in conjunction with the limit parameter to page through X number of responses. Default is 0.
115+ :param exclude_locked: boolean indicating whether to exclude locked tasks. Default is 'false'.
116+ :param order: the order of the results. Default is 'ASC'
117+ :param include_total: whether to include total or not. Default is 'false'
118+ :param include_geometries: whether to include geometries or not. Default is 'false'
119+ :param include_tags: whether to include tags or not. Default is 'false'
120+ :return: the API response from the PUT request
121+ """
122+ query_params = {
123+ "limit" : str (limit ),
124+ "page" : str (page ),
125+ "excludeLocked" : str (exclude_locked ),
126+ "order" : str (order ),
127+ "includeTotal" : str (include_total ),
128+ "includeGeometries" : str (include_geometries ),
129+ "includeTags" : str (include_tags )
130+ }
131+ response = self .put (
132+ endpoint = f'/tasks/box/{ left } /{ bottom } /{ right } /{ top } ' ,
133+ params = query_params
134+ )
135+ return response
136+
105137 def update_task_tags (self , task_id , tags ):
106138 """Method to update a task's tags using the supplied tags and corresponding task ID
107139
0 commit comments