Method: Appwrite::Functions#update_variable
- Defined in:
- lib/appwrite/services/functions.rb
#update_variable(function_id:, variable_id:, key:, value: nil) ⇒ Variable
Update variable by its unique ID.
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 |
# File 'lib/appwrite/services/functions.rb', line 880 def update_variable(function_id:, variable_id:, key:, value: nil) api_path = '/functions/{functionId}/variables/{variableId}' .gsub('{functionId}', function_id) .gsub('{variableId}', variable_id) if function_id.nil? raise Appwrite::Exception.new('Missing required parameter: "functionId"') end 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 api_params = { key: key, value: value, } api_headers = { "content-type": 'application/json', } @client.call( method: 'PUT', path: api_path, headers: api_headers, params: api_params, response_type: Models::Variable ) end |