Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Cloud Endpoints from Initialize SDKs Wizards #1189

Merged
merged 10 commits into from
Oct 9, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
import Id from '$lib/components/id.svelte';
import { WizardStep } from '$lib/layout';
import { sdk } from '$lib/stores/sdk';
import { isSelfHosted } from '$lib/system';

const { endpoint, project } = sdk.forProject.client.config;
const code = `import io.appwrite.Client
import io.appwrite.services.Account

val client = Client(context)
${
!isSelfHosted
? `val client = Client(context).setProject("${project}")`
: `val client = Client(context)
ItzNotABug marked this conversation as resolved.
Show resolved Hide resolved
.setEndpoint("${endpoint}")
.setProject("${project}")
.setSelfSigned(status = true) // For self signed certificates, only use for development`;
.setSelfSigned(status: true) // For self signed certificates, only use for development`
}`;
</script>

<WizardStep>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
const { endpoint, project } = sdk.forProject.client.config;
const code = `import Appwrite

let client = Client()
${
!isSelfHosted
? `let client = Client().setProject("${project}")`
: `let client = Client()
ItzNotABug marked this conversation as resolved.
Show resolved Hide resolved
.setEndpoint("${endpoint}")
.setProject("${project}")
.setSelfSigned(true) // For self signed certificates, only use for development`;
.setSelfSigned(true) // For self signed certificates, only use for development`
}`;

let showAlert = true;
</script>
Expand All @@ -21,9 +25,9 @@ let client = Client()

<h2 class="heading-level-7">Initialize your SDK</h2>
<p>
Initialize your SDK by pointing the client to your Appwrite project using your <Id
value={project}>Project ID</Id
>.
Initialize your SDK by pointing the client to your Appwrite project using your
<Id value={project}>Project ID</Id>
.
</p>
<Code label="Apple SDK" labelIcon="apple" language="swift" {code} withCopy withLineNumbers />
<p class="u-margin-block-start-24">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
const code = `import 'package:appwrite/appwrite.dart';

Client client = Client();
client
${
!isSelfHosted
? `client.setProject('${project}');`
: `client
ItzNotABug marked this conversation as resolved.
Show resolved Hide resolved
.setEndpoint('${endpoint}')
.setProject('${project}')
.setSelfSigned(status: true); // For self signed certificates, only use for development`;
.setSelfSigned(status: true); // For self signed certificates, only use for development;`
}`;

let showAlert = true;
</script>
Expand All @@ -22,8 +26,8 @@ client

<h2 class="heading-level-7">Initialize your SDK</h2>
<p data-private>
Initialize your SDK by pointing the client to your Appwrite project using your <Id
value={project}>Project ID</Id>
Initialize your SDK by pointing the client to your Appwrite project using your
<Id value={project}>Project ID</Id>
</p>
<div class="u-margin-block-start-16">
<Code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@
import Id from '$lib/components/id.svelte';
import { WizardStep } from '$lib/layout';
import { sdk } from '$lib/stores/sdk';
import { isSelfHosted } from '$lib/system';

const { endpoint, project } = sdk.forProject.client.config;
const code = `const client = new Client();

client
${
!isSelfHosted
? `client.setProject('${project}');`
: `client
ItzNotABug marked this conversation as resolved.
Show resolved Hide resolved
.setEndpoint('${endpoint}')
.setProject('${project}');`;
.setProject('${project}');`
}`;
</script>

<WizardStep>
Expand Down