@@ -257,7 +257,7 @@ def create_boolean_attribute(self, database_id, collection_id, key, required, de
257
257
'content-type' : 'application/json' ,
258
258
}, api_params )
259
259
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 ):
261
261
"""Update boolean attribute"""
262
262
263
263
@@ -281,6 +281,7 @@ def update_boolean_attribute(self, database_id, collection_id, key, required, de
281
281
282
282
api_params ['required' ] = required
283
283
api_params ['default' ] = default
284
+ api_params ['newKey' ] = new_key
284
285
285
286
return self .client .call ('patch' , api_path , {
286
287
'content-type' : 'application/json' ,
@@ -316,7 +317,7 @@ def create_datetime_attribute(self, database_id, collection_id, key, required, d
316
317
'content-type' : 'application/json' ,
317
318
}, api_params )
318
319
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 ):
320
321
"""Update dateTime attribute"""
321
322
322
323
@@ -340,6 +341,7 @@ def update_datetime_attribute(self, database_id, collection_id, key, required, d
340
341
341
342
api_params ['required' ] = required
342
343
api_params ['default' ] = default
344
+ api_params ['newKey' ] = new_key
343
345
344
346
return self .client .call ('patch' , api_path , {
345
347
'content-type' : 'application/json' ,
@@ -375,7 +377,7 @@ def create_email_attribute(self, database_id, collection_id, key, required, defa
375
377
'content-type' : 'application/json' ,
376
378
}, api_params )
377
379
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 ):
379
381
"""Update email attribute"""
380
382
381
383
@@ -399,6 +401,7 @@ def update_email_attribute(self, database_id, collection_id, key, required, defa
399
401
400
402
api_params ['required' ] = required
401
403
api_params ['default' ] = default
404
+ api_params ['newKey' ] = new_key
402
405
403
406
return self .client .call ('patch' , api_path , {
404
407
'content-type' : 'application/json' ,
@@ -438,7 +441,7 @@ def create_enum_attribute(self, database_id, collection_id, key, elements, requi
438
441
'content-type' : 'application/json' ,
439
442
}, api_params )
440
443
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 ):
442
445
"""Update enum attribute"""
443
446
444
447
@@ -466,6 +469,7 @@ def update_enum_attribute(self, database_id, collection_id, key, elements, requi
466
469
api_params ['elements' ] = elements
467
470
api_params ['required' ] = required
468
471
api_params ['default' ] = default
472
+ api_params ['newKey' ] = new_key
469
473
470
474
return self .client .call ('patch' , api_path , {
471
475
'content-type' : 'application/json' ,
@@ -503,7 +507,7 @@ def create_float_attribute(self, database_id, collection_id, key, required, min
503
507
'content-type' : 'application/json' ,
504
508
}, api_params )
505
509
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 ):
507
511
"""Update float attribute"""
508
512
509
513
@@ -535,6 +539,7 @@ def update_float_attribute(self, database_id, collection_id, key, required, min,
535
539
api_params ['min' ] = min
536
540
api_params ['max' ] = max
537
541
api_params ['default' ] = default
542
+ api_params ['newKey' ] = new_key
538
543
539
544
return self .client .call ('patch' , api_path , {
540
545
'content-type' : 'application/json' ,
@@ -572,7 +577,7 @@ def create_integer_attribute(self, database_id, collection_id, key, required, mi
572
577
'content-type' : 'application/json' ,
573
578
}, api_params )
574
579
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 ):
576
581
"""Update integer attribute"""
577
582
578
583
@@ -604,6 +609,7 @@ def update_integer_attribute(self, database_id, collection_id, key, required, mi
604
609
api_params ['min' ] = min
605
610
api_params ['max' ] = max
606
611
api_params ['default' ] = default
612
+ api_params ['newKey' ] = new_key
607
613
608
614
return self .client .call ('patch' , api_path , {
609
615
'content-type' : 'application/json' ,
@@ -639,7 +645,7 @@ def create_ip_attribute(self, database_id, collection_id, key, required, default
639
645
'content-type' : 'application/json' ,
640
646
}, api_params )
641
647
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 ):
643
649
"""Update IP address attribute"""
644
650
645
651
@@ -663,6 +669,7 @@ def update_ip_attribute(self, database_id, collection_id, key, required, default
663
669
664
670
api_params ['required' ] = required
665
671
api_params ['default' ] = default
672
+ api_params ['newKey' ] = new_key
666
673
667
674
return self .client .call ('patch' , api_path , {
668
675
'content-type' : 'application/json' ,
@@ -735,7 +742,7 @@ def create_string_attribute(self, database_id, collection_id, key, size, require
735
742
'content-type' : 'application/json' ,
736
743
}, api_params )
737
744
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 ):
739
746
"""Update string attribute"""
740
747
741
748
@@ -759,6 +766,8 @@ def update_string_attribute(self, database_id, collection_id, key, required, def
759
766
760
767
api_params ['required' ] = required
761
768
api_params ['default' ] = default
769
+ api_params ['size' ] = size
770
+ api_params ['newKey' ] = new_key
762
771
763
772
return self .client .call ('patch' , api_path , {
764
773
'content-type' : 'application/json' ,
@@ -794,7 +803,7 @@ def create_url_attribute(self, database_id, collection_id, key, required, defaul
794
803
'content-type' : 'application/json' ,
795
804
}, api_params )
796
805
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 ):
798
807
"""Update URL attribute"""
799
808
800
809
@@ -818,6 +827,7 @@ def update_url_attribute(self, database_id, collection_id, key, required, defaul
818
827
819
828
api_params ['required' ] = required
820
829
api_params ['default' ] = default
830
+ api_params ['newKey' ] = new_key
821
831
822
832
return self .client .call ('patch' , api_path , {
823
833
'content-type' : 'application/json' ,
@@ -871,7 +881,7 @@ def delete_attribute(self, database_id, collection_id, key):
871
881
'content-type' : 'application/json' ,
872
882
}, api_params )
873
883
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 ):
875
885
"""Update relationship attribute"""
876
886
877
887
@@ -891,6 +901,7 @@ def update_relationship_attribute(self, database_id, collection_id, key, on_dele
891
901
api_path = api_path .replace ('{key}' , key )
892
902
893
903
api_params ['onDelete' ] = on_delete
904
+ api_params ['newKey' ] = new_key
894
905
895
906
return self .client .call ('patch' , api_path , {
896
907
'content-type' : 'application/json' ,
0 commit comments