@@ -257,7 +257,7 @@ def create_boolean_attribute(self, database_id, collection_id, key, required, de
257257 'content-type' : 'application/json' ,
258258 }, api_params )
259259
260- def update_boolean_attribute (self , database_id , collection_id , key , required , default ):
260+ def update_boolean_attribute (self , database_id , collection_id , key , required , default , new_key = None ):
261261 """Update boolean attribute"""
262262
263263
@@ -281,6 +281,7 @@ def update_boolean_attribute(self, database_id, collection_id, key, required, de
281281
282282 api_params ['required' ] = required
283283 api_params ['default' ] = default
284+ api_params ['newKey' ] = new_key
284285
285286 return self .client .call ('patch' , api_path , {
286287 'content-type' : 'application/json' ,
@@ -316,7 +317,7 @@ def create_datetime_attribute(self, database_id, collection_id, key, required, d
316317 'content-type' : 'application/json' ,
317318 }, api_params )
318319
319- def update_datetime_attribute (self , database_id , collection_id , key , required , default ):
320+ def update_datetime_attribute (self , database_id , collection_id , key , required , default , new_key = None ):
320321 """Update dateTime attribute"""
321322
322323
@@ -340,6 +341,7 @@ def update_datetime_attribute(self, database_id, collection_id, key, required, d
340341
341342 api_params ['required' ] = required
342343 api_params ['default' ] = default
344+ api_params ['newKey' ] = new_key
343345
344346 return self .client .call ('patch' , api_path , {
345347 'content-type' : 'application/json' ,
@@ -375,7 +377,7 @@ def create_email_attribute(self, database_id, collection_id, key, required, defa
375377 'content-type' : 'application/json' ,
376378 }, api_params )
377379
378- def update_email_attribute (self , database_id , collection_id , key , required , default ):
380+ def update_email_attribute (self , database_id , collection_id , key , required , default , new_key = None ):
379381 """Update email attribute"""
380382
381383
@@ -399,6 +401,7 @@ def update_email_attribute(self, database_id, collection_id, key, required, defa
399401
400402 api_params ['required' ] = required
401403 api_params ['default' ] = default
404+ api_params ['newKey' ] = new_key
402405
403406 return self .client .call ('patch' , api_path , {
404407 'content-type' : 'application/json' ,
@@ -438,7 +441,7 @@ def create_enum_attribute(self, database_id, collection_id, key, elements, requi
438441 'content-type' : 'application/json' ,
439442 }, api_params )
440443
441- def update_enum_attribute (self , database_id , collection_id , key , elements , required , default ):
444+ def update_enum_attribute (self , database_id , collection_id , key , elements , required , default , new_key = None ):
442445 """Update enum attribute"""
443446
444447
@@ -466,6 +469,7 @@ def update_enum_attribute(self, database_id, collection_id, key, elements, requi
466469 api_params ['elements' ] = elements
467470 api_params ['required' ] = required
468471 api_params ['default' ] = default
472+ api_params ['newKey' ] = new_key
469473
470474 return self .client .call ('patch' , api_path , {
471475 'content-type' : 'application/json' ,
@@ -503,7 +507,7 @@ def create_float_attribute(self, database_id, collection_id, key, required, min
503507 'content-type' : 'application/json' ,
504508 }, api_params )
505509
506- def update_float_attribute (self , database_id , collection_id , key , required , min , max , default ):
510+ def update_float_attribute (self , database_id , collection_id , key , required , min , max , default , new_key = None ):
507511 """Update float attribute"""
508512
509513
@@ -535,6 +539,7 @@ def update_float_attribute(self, database_id, collection_id, key, required, min,
535539 api_params ['min' ] = min
536540 api_params ['max' ] = max
537541 api_params ['default' ] = default
542+ api_params ['newKey' ] = new_key
538543
539544 return self .client .call ('patch' , api_path , {
540545 'content-type' : 'application/json' ,
@@ -572,7 +577,7 @@ def create_integer_attribute(self, database_id, collection_id, key, required, mi
572577 'content-type' : 'application/json' ,
573578 }, api_params )
574579
575- def update_integer_attribute (self , database_id , collection_id , key , required , min , max , default ):
580+ def update_integer_attribute (self , database_id , collection_id , key , required , min , max , default , new_key = None ):
576581 """Update integer attribute"""
577582
578583
@@ -604,6 +609,7 @@ def update_integer_attribute(self, database_id, collection_id, key, required, mi
604609 api_params ['min' ] = min
605610 api_params ['max' ] = max
606611 api_params ['default' ] = default
612+ api_params ['newKey' ] = new_key
607613
608614 return self .client .call ('patch' , api_path , {
609615 'content-type' : 'application/json' ,
@@ -639,7 +645,7 @@ def create_ip_attribute(self, database_id, collection_id, key, required, default
639645 'content-type' : 'application/json' ,
640646 }, api_params )
641647
642- def update_ip_attribute (self , database_id , collection_id , key , required , default ):
648+ def update_ip_attribute (self , database_id , collection_id , key , required , default , new_key = None ):
643649 """Update IP address attribute"""
644650
645651
@@ -663,6 +669,7 @@ def update_ip_attribute(self, database_id, collection_id, key, required, default
663669
664670 api_params ['required' ] = required
665671 api_params ['default' ] = default
672+ api_params ['newKey' ] = new_key
666673
667674 return self .client .call ('patch' , api_path , {
668675 'content-type' : 'application/json' ,
@@ -735,7 +742,7 @@ def create_string_attribute(self, database_id, collection_id, key, size, require
735742 'content-type' : 'application/json' ,
736743 }, api_params )
737744
738- def update_string_attribute (self , database_id , collection_id , key , required , default ):
745+ def update_string_attribute (self , database_id , collection_id , key , required , default , size = None , new_key = None ):
739746 """Update string attribute"""
740747
741748
@@ -759,6 +766,8 @@ def update_string_attribute(self, database_id, collection_id, key, required, def
759766
760767 api_params ['required' ] = required
761768 api_params ['default' ] = default
769+ api_params ['size' ] = size
770+ api_params ['newKey' ] = new_key
762771
763772 return self .client .call ('patch' , api_path , {
764773 'content-type' : 'application/json' ,
@@ -794,7 +803,7 @@ def create_url_attribute(self, database_id, collection_id, key, required, defaul
794803 'content-type' : 'application/json' ,
795804 }, api_params )
796805
797- def update_url_attribute (self , database_id , collection_id , key , required , default ):
806+ def update_url_attribute (self , database_id , collection_id , key , required , default , new_key = None ):
798807 """Update URL attribute"""
799808
800809
@@ -818,6 +827,7 @@ def update_url_attribute(self, database_id, collection_id, key, required, defaul
818827
819828 api_params ['required' ] = required
820829 api_params ['default' ] = default
830+ api_params ['newKey' ] = new_key
821831
822832 return self .client .call ('patch' , api_path , {
823833 'content-type' : 'application/json' ,
@@ -871,7 +881,7 @@ def delete_attribute(self, database_id, collection_id, key):
871881 'content-type' : 'application/json' ,
872882 }, api_params )
873883
874- def update_relationship_attribute (self , database_id , collection_id , key , on_delete = None ):
884+ def update_relationship_attribute (self , database_id , collection_id , key , on_delete = None , new_key = None ):
875885 """Update relationship attribute"""
876886
877887
@@ -891,6 +901,7 @@ def update_relationship_attribute(self, database_id, collection_id, key, on_dele
891901 api_path = api_path .replace ('{key}' , key )
892902
893903 api_params ['onDelete' ] = on_delete
904+ api_params ['newKey' ] = new_key
894905
895906 return self .client .call ('patch' , api_path , {
896907 'content-type' : 'application/json' ,
0 commit comments