2024-07-03 15:25:40 +00:00
|
|
|
require 'appwrite'
|
|
|
|
|
|
|
|
|
|
include Appwrite
|
|
|
|
|
|
|
|
|
|
client = Client.new
|
|
|
|
|
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
|
2024-08-21 10:53:05 +00:00
|
|
|
.set_project('<YOUR_PROJECT_ID>') # Your project ID
|
2024-07-03 15:25:40 +00:00
|
|
|
.set_session('') # The user session to authenticate with
|
|
|
|
|
|
|
|
|
|
functions = Functions.new(client)
|
|
|
|
|
|
|
|
|
|
result = functions.create_execution(
|
|
|
|
|
function_id: '<FUNCTION_ID>',
|
|
|
|
|
body: '<BODY>', # optional
|
|
|
|
|
async: false, # optional
|
|
|
|
|
path: '<PATH>', # optional
|
|
|
|
|
method: ExecutionMethod::GET, # optional
|
|
|
|
|
headers: {}, # optional
|
|
|
|
|
scheduled_at: '' # optional
|
|
|
|
|
)
|