Class: Appwrite::Project
- Defined in:
- lib/appwrite/services/project.rb
Instance Method Summary collapse
-
#create_android_platform(platform_id:, name:, application_id:) ⇒ PlatformAndroid
Create a new Android platform for your project.
-
#create_apple_platform(platform_id:, name:, bundle_identifier:) ⇒ PlatformApple
Create a new Apple platform for your project.
-
#create_key(key_id:, name:, scopes:, expire: nil) ⇒ Key
Create a new API key.
-
#create_linux_platform(platform_id:, name:, package_name:) ⇒ PlatformLinux
Create a new Linux platform for your project.
-
#create_variable(variable_id:, key:, value:, secret: nil) ⇒ Variable
Create a new project environment variable.
-
#create_web_platform(platform_id:, name:, hostname:) ⇒ PlatformWeb
Create a new web platform for your project.
-
#create_windows_platform(platform_id:, name:, package_identifier_name:) ⇒ PlatformWindows
Create a new Windows platform for your project.
-
#delete_key(key_id:) ⇒ Object
Delete a key by its unique ID.
-
#delete_platform(platform_id:) ⇒ Object
Delete a platform by its unique ID.
-
#delete_variable(variable_id:) ⇒ Object
Delete a variable by its unique ID.
-
#get_key(key_id:) ⇒ Key
Get a key by its unique ID.
-
#get_platform(platform_id:) ⇒ PlatformWeb, ...
Get a platform by its unique ID.
-
#get_variable(variable_id:) ⇒ Variable
Get a variable by its unique ID.
-
#initialize(client) ⇒ Project
constructor
A new instance of Project.
-
#list_keys(queries: nil, total: nil) ⇒ KeyList
Get a list of all API keys from the current project.
-
#list_platforms(queries: nil, total: nil) ⇒ PlatformList
Get a list of all platforms in the project.
-
#list_variables(queries: nil, total: nil) ⇒ VariableList
Get a list of all project environment variables.
-
#update_android_platform(platform_id:, name:, application_id:) ⇒ PlatformAndroid
Update an Android platform by its unique ID.
-
#update_apple_platform(platform_id:, name:, bundle_identifier:) ⇒ PlatformApple
Update an Apple platform by its unique ID.
-
#update_key(key_id:, name:, scopes:, expire: nil) ⇒ Key
Update a key by its unique ID.
-
#update_labels(labels:) ⇒ Project
Update the project labels.
-
#update_linux_platform(platform_id:, name:, package_name:) ⇒ PlatformLinux
Update a Linux platform by its unique ID.
-
#update_protocol_status(protocol_id:, enabled:) ⇒ Project
Update the status of a specific protocol.
-
#update_service_status(service_id:, enabled:) ⇒ Project
Update the status of a specific service.
-
#update_variable(variable_id:, key: nil, value: nil, secret: nil) ⇒ Variable
Update variable by its unique ID.
-
#update_web_platform(platform_id:, name:, hostname:) ⇒ PlatformWeb
Update a web platform by its unique ID.
-
#update_windows_platform(platform_id:, name:, package_identifier_name:) ⇒ PlatformWindows
Update a Windows platform by its unique ID.
Constructor Details
#initialize(client) ⇒ Project
Returns a new instance of Project.
6 7 8 |
# File 'lib/appwrite/services/project.rb', line 6 def initialize(client) @client = client end |
Instance Method Details
#create_android_platform(platform_id:, name:, application_id:) ⇒ PlatformAndroid
Create a new Android platform for your project. Use this endpoint to register a new Android platform where your users will run your application which will interact with the Appwrite API.
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/appwrite/services/project.rb', line 254 def create_android_platform(platform_id:, name:, application_id:) api_path = '/project/platforms/android' if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if application_id.nil? raise Appwrite::Exception.new('Missing required parameter: "applicationId"') end api_params = { platformId: platform_id, name: name, applicationId: application_id, } api_headers = { "content-type": 'application/json', } @client.call( method: 'POST', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformAndroid ) end |
#create_apple_platform(platform_id:, name:, bundle_identifier:) ⇒ PlatformApple
Create a new Apple platform for your project. Use this endpoint to register a new Apple platform where your users will run your application which will interact with the Appwrite API.
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/appwrite/services/project.rb', line 341 def create_apple_platform(platform_id:, name:, bundle_identifier:) api_path = '/project/platforms/apple' if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if bundle_identifier.nil? raise Appwrite::Exception.new('Missing required parameter: "bundleIdentifier"') end api_params = { platformId: platform_id, name: name, bundleIdentifier: bundle_identifier, } api_headers = { "content-type": 'application/json', } @client.call( method: 'POST', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformApple ) end |
#create_key(key_id:, name:, scopes:, expire: nil) ⇒ Key
Create a new API key. It’s recommended to have multiple API keys with strict scopes for separate functions within your project.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/appwrite/services/project.rb', line 46 def create_key(key_id:, name:, scopes:, expire: nil) api_path = '/project/keys' if key_id.nil? raise Appwrite::Exception.new('Missing required parameter: "keyId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if scopes.nil? raise Appwrite::Exception.new('Missing required parameter: "scopes"') end api_params = { keyId: key_id, name: name, scopes: scopes, expire: expire, } api_headers = { "content-type": 'application/json', } @client.call( method: 'POST', path: api_path, headers: api_headers, params: api_params, response_type: Models::Key ) end |
#create_linux_platform(platform_id:, name:, package_name:) ⇒ PlatformLinux
Create a new Linux platform for your project. Use this endpoint to register a new Linux platform where your users will run your application which will interact with the Appwrite API.
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/appwrite/services/project.rb', line 428 def create_linux_platform(platform_id:, name:, package_name:) api_path = '/project/platforms/linux' if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if package_name.nil? raise Appwrite::Exception.new('Missing required parameter: "packageName"') end api_params = { platformId: platform_id, name: name, packageName: package_name, } api_headers = { "content-type": 'application/json', } @client.call( method: 'POST', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformLinux ) end |
#create_variable(variable_id:, key:, value:, secret: nil) ⇒ Variable
Create a new project environment variable. These variables can be accessed by all functions and sites in the project.
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 |
# File 'lib/appwrite/services/project.rb', line 880 def create_variable(variable_id:, key:, value:, secret: nil) api_path = '/project/variables' if variable_id.nil? raise Appwrite::Exception.new('Missing required parameter: "variableId"') end if key.nil? raise Appwrite::Exception.new('Missing required parameter: "key"') end if value.nil? raise Appwrite::Exception.new('Missing required parameter: "value"') end api_params = { variableId: variable_id, key: key, value: value, secret: secret, } api_headers = { "content-type": 'application/json', } @client.call( method: 'POST', path: api_path, headers: api_headers, params: api_params, response_type: Models::Variable ) end |
#create_web_platform(platform_id:, name:, hostname:) ⇒ PlatformWeb
Create a new web platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/appwrite/services/project.rb', line 515 def create_web_platform(platform_id:, name:, hostname:) api_path = '/project/platforms/web' if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if hostname.nil? raise Appwrite::Exception.new('Missing required parameter: "hostname"') end api_params = { platformId: platform_id, name: name, hostname: hostname, } api_headers = { "content-type": 'application/json', } @client.call( method: 'POST', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformWeb ) end |
#create_windows_platform(platform_id:, name:, package_identifier_name:) ⇒ PlatformWindows
Create a new Windows platform for your project. Use this endpoint to register a new Windows platform where your users will run your application which will interact with the Appwrite API.
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
# File 'lib/appwrite/services/project.rb', line 602 def create_windows_platform(platform_id:, name:, package_identifier_name:) api_path = '/project/platforms/windows' if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if package_identifier_name.nil? raise Appwrite::Exception.new('Missing required parameter: "packageIdentifierName"') end api_params = { platformId: platform_id, name: name, packageIdentifierName: package_identifier_name, } api_headers = { "content-type": 'application/json', } @client.call( method: 'POST', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformWindows ) end |
#delete_key(key_id:) ⇒ Object
Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/appwrite/services/project.rb', line 162 def delete_key(key_id:) api_path = '/project/keys/{keyId}' .gsub('{keyId}', key_id) if key_id.nil? raise Appwrite::Exception.new('Missing required parameter: "keyId"') end api_params = { } api_headers = { "content-type": 'application/json', } @client.call( method: 'DELETE', path: api_path, headers: api_headers, params: api_params, ) end |
#delete_platform(platform_id:) ⇒ Object
Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.
746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 |
# File 'lib/appwrite/services/project.rb', line 746 def delete_platform(platform_id:) api_path = '/project/platforms/{platformId}' .gsub('{platformId}', platform_id) if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end api_params = { } api_headers = { "content-type": 'application/json', } @client.call( method: 'DELETE', path: api_path, headers: api_headers, params: api_params, ) end |
#delete_variable(variable_id:) ⇒ Object
Delete a variable by its unique ID.
986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
# File 'lib/appwrite/services/project.rb', line 986 def delete_variable(variable_id:) api_path = '/project/variables/{variableId}' .gsub('{variableId}', variable_id) if variable_id.nil? raise Appwrite::Exception.new('Missing required parameter: "variableId"') end api_params = { } api_headers = { "content-type": 'application/json', } @client.call( method: 'DELETE', path: api_path, headers: api_headers, params: api_params, ) end |
#get_key(key_id:) ⇒ Key
Get a key by its unique ID.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/appwrite/services/project.rb', line 87 def get_key(key_id:) api_path = '/project/keys/{keyId}' .gsub('{keyId}', key_id) if key_id.nil? raise Appwrite::Exception.new('Missing required parameter: "keyId"') end api_params = { } api_headers = { } @client.call( method: 'GET', path: api_path, headers: api_headers, params: api_params, response_type: Models::Key ) end |
#get_platform(platform_id:) ⇒ PlatformWeb, ...
Get a platform by its unique ID. This endpoint returns the platform’s details, including its name, type, and key configurations.
686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 |
# File 'lib/appwrite/services/project.rb', line 686 def get_platform(platform_id:) api_path = '/project/platforms/{platformId}' .gsub('{platformId}', platform_id) if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end api_params = { } api_headers = { } response = @client.call( method: 'GET', path: api_path, headers: api_headers, params: api_params, ) unless response.is_a?(Hash) raise Exception, "Expected object response when hydrating a response model" end if response['type'] == 'web' return Models::PlatformWeb.from(map: response) end if response['type'] == 'apple' return Models::PlatformApple.from(map: response) end if response['type'] == 'android' return Models::PlatformAndroid.from(map: response) end if response['type'] == 'windows' return Models::PlatformWindows.from(map: response) end if response['type'] == 'linux' return Models::PlatformLinux.from(map: response) end raise Exception, "Unable to match response to any expected response model" end |
#get_variable(variable_id:) ⇒ Variable
Get a variable by its unique ID.
921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 |
# File 'lib/appwrite/services/project.rb', line 921 def get_variable(variable_id:) api_path = '/project/variables/{variableId}' .gsub('{variableId}', variable_id) if variable_id.nil? raise Appwrite::Exception.new('Missing required parameter: "variableId"') end api_params = { } api_headers = { } @client.call( method: 'GET', path: api_path, headers: api_headers, params: api_params, response_type: Models::Variable ) end |
#list_keys(queries: nil, total: nil) ⇒ KeyList
Get a list of all API keys from the current project.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/appwrite/services/project.rb', line 16 def list_keys(queries: nil, total: nil) api_path = '/project/keys' api_params = { queries: queries, total: total, } api_headers = { } @client.call( method: 'GET', path: api_path, headers: api_headers, params: api_params, response_type: Models::KeyList ) end |
#list_platforms(queries: nil, total: nil) ⇒ PlatformList
Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/appwrite/services/project.rb', line 224 def list_platforms(queries: nil, total: nil) api_path = '/project/platforms' api_params = { queries: queries, total: total, } api_headers = { } @client.call( method: 'GET', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformList ) end |
#list_variables(queries: nil, total: nil) ⇒ VariableList
Get a list of all project environment variables.
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 |
# File 'lib/appwrite/services/project.rb', line 850 def list_variables(queries: nil, total: nil) api_path = '/project/variables' api_params = { queries: queries, total: total, } api_headers = { } @client.call( method: 'GET', path: api_path, headers: api_headers, params: api_params, response_type: Models::VariableList ) end |
#update_android_platform(platform_id:, name:, application_id:) ⇒ PlatformAndroid
Update an Android platform by its unique ID. Use this endpoint to update the platform’s name or application ID.
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
# File 'lib/appwrite/services/project.rb', line 297 def update_android_platform(platform_id:, name:, application_id:) api_path = '/project/platforms/android/{platformId}' .gsub('{platformId}', platform_id) if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if application_id.nil? raise Appwrite::Exception.new('Missing required parameter: "applicationId"') end api_params = { name: name, applicationId: application_id, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PUT', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformAndroid ) end |
#update_apple_platform(platform_id:, name:, bundle_identifier:) ⇒ PlatformApple
Update an Apple platform by its unique ID. Use this endpoint to update the platform’s name or bundle identifier.
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/appwrite/services/project.rb', line 384 def update_apple_platform(platform_id:, name:, bundle_identifier:) api_path = '/project/platforms/apple/{platformId}' .gsub('{platformId}', platform_id) if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if bundle_identifier.nil? raise Appwrite::Exception.new('Missing required parameter: "bundleIdentifier"') end api_params = { name: name, bundleIdentifier: bundle_identifier, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PUT', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformApple ) end |
#update_key(key_id:, name:, scopes:, expire: nil) ⇒ Key
Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/appwrite/services/project.rb', line 120 def update_key(key_id:, name:, scopes:, expire: nil) api_path = '/project/keys/{keyId}' .gsub('{keyId}', key_id) if key_id.nil? raise Appwrite::Exception.new('Missing required parameter: "keyId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if scopes.nil? raise Appwrite::Exception.new('Missing required parameter: "scopes"') end api_params = { name: name, scopes: scopes, expire: expire, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PUT', path: api_path, headers: api_headers, params: api_params, response_type: Models::Key ) end |
#update_labels(labels:) ⇒ Project
Update the project labels. Labels can be used to easily filter projects in an organization.
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/appwrite/services/project.rb', line 192 def update_labels(labels:) api_path = '/project/labels' if labels.nil? raise Appwrite::Exception.new('Missing required parameter: "labels"') end api_params = { labels: labels, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PUT', path: api_path, headers: api_headers, params: api_params, response_type: Models::Project ) end |
#update_linux_platform(platform_id:, name:, package_name:) ⇒ PlatformLinux
Update a Linux platform by its unique ID. Use this endpoint to update the platform’s name or package name.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/appwrite/services/project.rb', line 471 def update_linux_platform(platform_id:, name:, package_name:) api_path = '/project/platforms/linux/{platformId}' .gsub('{platformId}', platform_id) if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if package_name.nil? raise Appwrite::Exception.new('Missing required parameter: "packageName"') end api_params = { name: name, packageName: package_name, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PUT', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformLinux ) end |
#update_protocol_status(protocol_id:, enabled:) ⇒ Project
Update the status of a specific protocol. Use this endpoint to enable or disable a protocol in your project.
777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 |
# File 'lib/appwrite/services/project.rb', line 777 def update_protocol_status(protocol_id:, enabled:) api_path = '/project/protocols/{protocolId}/status' .gsub('{protocolId}', protocol_id) if protocol_id.nil? raise Appwrite::Exception.new('Missing required parameter: "protocolId"') end if enabled.nil? raise Appwrite::Exception.new('Missing required parameter: "enabled"') end api_params = { enabled: enabled, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PATCH', path: api_path, headers: api_headers, params: api_params, response_type: Models::Project ) end |
#update_service_status(service_id:, enabled:) ⇒ Project
Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 |
# File 'lib/appwrite/services/project.rb', line 814 def update_service_status(service_id:, enabled:) api_path = '/project/services/{serviceId}/status' .gsub('{serviceId}', service_id) if service_id.nil? raise Appwrite::Exception.new('Missing required parameter: "serviceId"') end if enabled.nil? raise Appwrite::Exception.new('Missing required parameter: "enabled"') end api_params = { enabled: enabled, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PATCH', path: api_path, headers: api_headers, params: api_params, response_type: Models::Project ) end |
#update_variable(variable_id:, key: nil, value: nil, secret: nil) ⇒ Variable
Update variable by its unique ID.
953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 |
# File 'lib/appwrite/services/project.rb', line 953 def update_variable(variable_id:, key: nil, value: nil, secret: nil) api_path = '/project/variables/{variableId}' .gsub('{variableId}', variable_id) if variable_id.nil? raise Appwrite::Exception.new('Missing required parameter: "variableId"') end api_params = { key: key, value: value, secret: secret, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PUT', path: api_path, headers: api_headers, params: api_params, response_type: Models::Variable ) end |
#update_web_platform(platform_id:, name:, hostname:) ⇒ PlatformWeb
Update a web platform by its unique ID. Use this endpoint to update the platform’s name or hostname.
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 |
# File 'lib/appwrite/services/project.rb', line 558 def update_web_platform(platform_id:, name:, hostname:) api_path = '/project/platforms/web/{platformId}' .gsub('{platformId}', platform_id) if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if hostname.nil? raise Appwrite::Exception.new('Missing required parameter: "hostname"') end api_params = { name: name, hostname: hostname, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PUT', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformWeb ) end |
#update_windows_platform(platform_id:, name:, package_identifier_name:) ⇒ PlatformWindows
Update a Windows platform by its unique ID. Use this endpoint to update the platform’s name or package identifier name.
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'lib/appwrite/services/project.rb', line 645 def update_windows_platform(platform_id:, name:, package_identifier_name:) api_path = '/project/platforms/windows/{platformId}' .gsub('{platformId}', platform_id) if platform_id.nil? raise Appwrite::Exception.new('Missing required parameter: "platformId"') end if name.nil? raise Appwrite::Exception.new('Missing required parameter: "name"') end if package_identifier_name.nil? raise Appwrite::Exception.new('Missing required parameter: "packageIdentifierName"') end api_params = { name: name, packageIdentifierName: package_identifier_name, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PUT', path: api_path, headers: api_headers, params: api_params, response_type: Models::PlatformWindows ) end |