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

docs: Remove setEndpoint #1223

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

docs: Remove setEndpoint #1223

wants to merge 12 commits into from

Conversation

choir241
Copy link
Contributor

What does this PR do?

Remove setEndpoint() from all code examples

Test Plan

X

Related PRs and Issues

X

Have you read the Contributing Guidelines on issues?

Yes

@choir241 choir241 marked this pull request as draft August 16, 2024 19:25
@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Aug 18, 2024

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2024-08-21 02:53:09 CET

@@ -189,14 +189,12 @@ struct FooPackage {
static let account = Account(client)

public static func login(
endpoint: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where login() is used will probably need to be updated.

.setProject('<PROJECT_ID>') // Your project ID
.setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token
.setProject('<PROJECT_ID>') // Your project ID
.setJWT('eyJJ9.eyJ...886ca'); // Your secret JSON Web Token
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use <USER_JWT> placeholder

@@ -58,7 +58,6 @@ object Appwrite {

fun init(context: Context) {
client = Client(context)
.setEndpoint(ENDPOINT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need the const anymore, right?

@@ -102,7 +102,6 @@ object Appwrite {

fun init(context: Context) {
client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update the [YOUR_PROJECT_ID] placeholder too

@@ -110,7 +110,6 @@ class Appwrite {

public init() {
self.client = Client()
.setEndpoint("https://cloud.appwrite.io/v1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update the [YOUR_PROJECT_ID] placeholder too

@@ -25,7 +25,6 @@ export const SESSION_COOKIE = "my-custom-session";

export function createAdminClient() {
const client = new Client()
.setEndpoint(process.env.APPWRITE_ENDPOINT!)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other parts of the tutorial needs to be updated too since this is removed, right?

@@ -66,7 +66,7 @@ const project: string = import.meta.env.VITE_APPWRITE_PROJECT;

const client: Client = new Client();

client.setEndpoint(url).setProject(project);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the const and env var can be removed, right?

@@ -51,7 +51,7 @@ const APPWRITE_PROJECT = "<YOUR_PROJECT_ID>"; // Replace with your project ID

const appwriteClient = new Appwrite();

appwriteClient.setEndpoint(APPWRITE_URL).setProject(APPWRITE_PROJECT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other parts of the tutorial needs to be updated too since this is removed, right?

@@ -21,7 +21,6 @@ import { Databases, Account, Client } from "appwrite";

const client = new Client();
client
.setEndpoint(PUBLIC_APPWRITE_ENDPOINT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other parts of the tutorial needs to be updated too since this is removed, right?

@@ -27,7 +27,6 @@ export const SESSION_COOKIE = 'my-custom-session';

export function createAdminClient() {
const client = new Client()
.setEndpoint(PUBLIC_APPWRITE_ENDPOINT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other parts of the tutorial needs to be updated too since this is removed, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants