appwrite / sdk-generator

Generating SDKs for multiple programming languages and platforms ⚙️
https://appwrite.io
MIT License
274 stars 173 forks source link

feat: php multiparts #940

Closed byawitz closed 3 months ago

byawitz commented 3 months ago

What does this PR do?

Changes createExecution to send and parse multipart data

Code example 👇

<?php

use Appwrite\Client;
use Appwrite\Payload;
use Appwrite\Services\Functions;

$client = (new Client())
    ->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
    ->setProject('&lt;YOUR_PROJECT_ID&gt;') // Your project ID
    ->setSession(''); // The user session to authenticate with

$functions = new Functions($client);

$result = $functions->createExecution(
    functionId: '<FUNCTION_ID>',
    body: Payload::fromJson([]), // optional
    async: false, // optional
    path: '<PATH>', // optional
    method: ExecutionMethod::GET(), // optional
    headers: '', // optional
    scheduledAt: '' // optional
);

Test Plan

image