appwrite/docs/examples/1.5.x/server-ruby/examples/functions/create-deployment.md

19 lines
496 B
Markdown
Raw Normal View History

2024-02-05 12:40:51 +00:00
require 'appwrite'
include Appwrite
client = Client.new
2025-04-22 13:02:33 +00:00
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
.set_project('<YOUR_PROJECT_ID>') # Your project ID
.set_key('<YOUR_API_KEY>') # Your secret API key
2024-02-05 12:40:51 +00:00
functions = Functions.new(client)
2024-02-27 08:12:00 +00:00
result = functions.create_deployment(
2024-02-24 11:34:42 +00:00
function_id: '<FUNCTION_ID>',
2024-02-21 11:31:50 +00:00
code: InputFile.from_path('dir/file.png'),
activate: false,
2024-02-24 11:34:42 +00:00
entrypoint: '<ENTRYPOINT>', # optional
commands: '<COMMANDS>' # optional
2024-02-21 11:31:50 +00:00
)