mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
chore: clean up docs
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
Client client = new Client(getApplicationContext())
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2"); // Your project ID
|
||||
|
||||
Database database = new Database(client);
|
||||
|
||||
database.createDocument(
|
||||
"[COLLECTION_ID]",
|
||||
"[DOCUMENT_ID]",
|
||||
mapOf( "a" to "b" ),
|
||||
new Continuation<Object>() {
|
||||
@NotNull
|
||||
@Override
|
||||
public CoroutineContext getContext() {
|
||||
return EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resumeWith(@NotNull Object o) {
|
||||
String json = "";
|
||||
try {
|
||||
if (o instanceof Result.Failure) {
|
||||
Result.Failure failure = (Result.Failure) o;
|
||||
throw failure.exception;
|
||||
} else {
|
||||
Response response = (Response) o;
|
||||
json = response.body().string();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
Log.e("ERROR", th.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
Client client = new Client(getApplicationContext())
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2"); // Your project ID
|
||||
|
||||
Database database = new Database(client);
|
||||
|
||||
database.deleteDocument(
|
||||
"[COLLECTION_ID]",
|
||||
"[DOCUMENT_ID]"
|
||||
new Continuation<Object>() {
|
||||
@NotNull
|
||||
@Override
|
||||
public CoroutineContext getContext() {
|
||||
return EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resumeWith(@NotNull Object o) {
|
||||
String json = "";
|
||||
try {
|
||||
if (o instanceof Result.Failure) {
|
||||
Result.Failure failure = (Result.Failure) o;
|
||||
throw failure.exception;
|
||||
} else {
|
||||
Response response = (Response) o;
|
||||
json = response.body().string();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
Log.e("ERROR", th.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
Client client = new Client(getApplicationContext())
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2"); // Your project ID
|
||||
|
||||
Database database = new Database(client);
|
||||
|
||||
database.getDocument(
|
||||
"[COLLECTION_ID]",
|
||||
"[DOCUMENT_ID]"
|
||||
new Continuation<Object>() {
|
||||
@NotNull
|
||||
@Override
|
||||
public CoroutineContext getContext() {
|
||||
return EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resumeWith(@NotNull Object o) {
|
||||
String json = "";
|
||||
try {
|
||||
if (o instanceof Result.Failure) {
|
||||
Result.Failure failure = (Result.Failure) o;
|
||||
throw failure.exception;
|
||||
} else {
|
||||
Response response = (Response) o;
|
||||
json = response.body().string();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
Log.e("ERROR", th.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
Client client = new Client(getApplicationContext())
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2"); // Your project ID
|
||||
|
||||
Database database = new Database(client);
|
||||
|
||||
database.listDocuments(
|
||||
"[COLLECTION_ID]",
|
||||
new Continuation<Object>() {
|
||||
@NotNull
|
||||
@Override
|
||||
public CoroutineContext getContext() {
|
||||
return EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resumeWith(@NotNull Object o) {
|
||||
String json = "";
|
||||
try {
|
||||
if (o instanceof Result.Failure) {
|
||||
Result.Failure failure = (Result.Failure) o;
|
||||
throw failure.exception;
|
||||
} else {
|
||||
Response response = (Response) o;
|
||||
json = response.body().string();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
Log.e("ERROR", th.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
|
||||
Client client = new Client(getApplicationContext())
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2"); // Your project ID
|
||||
|
||||
Database database = new Database(client);
|
||||
|
||||
database.updateDocument(
|
||||
"[COLLECTION_ID]",
|
||||
"[DOCUMENT_ID]",
|
||||
mapOf( "a" to "b" ),
|
||||
new Continuation<Object>() {
|
||||
@NotNull
|
||||
@Override
|
||||
public CoroutineContext getContext() {
|
||||
return EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resumeWith(@NotNull Object o) {
|
||||
String json = "";
|
||||
try {
|
||||
if (o instanceof Result.Failure) {
|
||||
Result.Failure failure = (Result.Failure) o;
|
||||
throw failure.exception;
|
||||
} else {
|
||||
Response response = (Response) o;
|
||||
json = response.body().string();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
Log.e("ERROR", th.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
|
||||
val database = Database(client)
|
||||
|
||||
GlobalScope.launch {
|
||||
val response = database.createDocument(
|
||||
collectionId = "[COLLECTION_ID]",
|
||||
documentId = "[DOCUMENT_ID]",
|
||||
data = mapOf( "a" to "b" ),
|
||||
)
|
||||
val json = response.body?.string()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
|
||||
val database = Database(client)
|
||||
|
||||
GlobalScope.launch {
|
||||
val response = database.deleteDocument(
|
||||
collectionId = "[COLLECTION_ID]",
|
||||
documentId = "[DOCUMENT_ID]"
|
||||
)
|
||||
val json = response.body?.string()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
|
||||
val database = Database(client)
|
||||
|
||||
GlobalScope.launch {
|
||||
val response = database.getDocument(
|
||||
collectionId = "[COLLECTION_ID]",
|
||||
documentId = "[DOCUMENT_ID]"
|
||||
)
|
||||
val json = response.body?.string()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
|
||||
val database = Database(client)
|
||||
|
||||
GlobalScope.launch {
|
||||
val response = database.listDocuments(
|
||||
collectionId = "[COLLECTION_ID]",
|
||||
)
|
||||
val json = response.body?.string()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import io.appwrite.Client
|
||||
import io.appwrite.services.Database
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
val client = Client(applicationContext)
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
|
||||
val database = Database(client)
|
||||
|
||||
GlobalScope.launch {
|
||||
val response = database.updateDocument(
|
||||
collectionId = "[COLLECTION_ID]",
|
||||
documentId = "[DOCUMENT_ID]",
|
||||
data = mapOf( "a" to "b" ),
|
||||
)
|
||||
val json = response.body?.string()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ func main() async throws {
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
let account = Account(client)
|
||||
let user = try await account.updatePrefs(
|
||||
prefs:
|
||||
prefs: [:]
|
||||
)
|
||||
|
||||
print(String(describing: user)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
let database = Database(client)
|
||||
let document = try await database.createDocument(
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
documentId: "[DOCUMENT_ID]",
|
||||
data:
|
||||
)
|
||||
|
||||
print(String(describing: document)
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
let database = Database(client)
|
||||
let result = try await database.deleteDocument(
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
documentId: "[DOCUMENT_ID]"
|
||||
)
|
||||
|
||||
print(String(describing: result)
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
let database = Database(client)
|
||||
let document = try await database.getDocument(
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
documentId: "[DOCUMENT_ID]"
|
||||
)
|
||||
|
||||
print(String(describing: document)
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
let database = Database(client)
|
||||
let documentList = try await database.listDocuments(
|
||||
collectionId: "[COLLECTION_ID]"
|
||||
)
|
||||
|
||||
print(String(describing: documentList)
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import Appwrite
|
||||
|
||||
func main() async throws {
|
||||
let client = Client()
|
||||
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.setProject("5df5acd0d48c2") // Your project ID
|
||||
let database = Database(client)
|
||||
let document = try await database.updateDocument(
|
||||
collectionId: "[COLLECTION_ID]",
|
||||
documentId: "[DOCUMENT_ID]",
|
||||
data:
|
||||
)
|
||||
|
||||
print(String(describing: document)
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Database database = Database(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = database.createDocument(
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
documentId: '[DOCUMENT_ID]',
|
||||
data: {},
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Database database = Database(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = database.deleteDocument(
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
documentId: '[DOCUMENT_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Database database = Database(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = database.getDocument(
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
documentId: '[DOCUMENT_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Database database = Database(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = database.listDocuments(
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
import 'package:appwrite/appwrite.dart';
|
||||
|
||||
void main() { // Init SDK
|
||||
Client client = Client();
|
||||
Database database = Database(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
Future result = database.updateDocument(
|
||||
collectionId: '[COLLECTION_ID]',
|
||||
documentId: '[DOCUMENT_ID]',
|
||||
data: {},
|
||||
);
|
||||
|
||||
result
|
||||
.then((response) {
|
||||
print(response);
|
||||
}).catchError((error) {
|
||||
print(error.response);
|
||||
});
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.createAnonymousSession();
|
||||
const promise = account.createAnonymousSession();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.createEmailSession('email@example.com', 'password');
|
||||
const promise = account.createEmailSession('email@example.com', 'password');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.createJWT();
|
||||
const promise = account.createJWT();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.createMagicURLSession('[USER_ID]', 'email@example.com');
|
||||
const promise = account.createMagicURLSession('[USER_ID]', 'email@example.com');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
// Go to OAuth provider login page
|
||||
sdk.account.createOAuth2Session('amazon');
|
||||
account.createOAuth2Session('amazon');
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.createPhoneSession('[USER_ID]', '');
|
||||
const promise = account.createPhoneSession('[USER_ID]', '');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.createPhoneVerification();
|
||||
const promise = account.createPhoneVerification();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.createRecovery('email@example.com', 'https://example.com');
|
||||
const promise = account.createRecovery('email@example.com', 'https://example.com');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
const sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.createSession('email@example.com', 'password');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.createVerification('https://example.com');
|
||||
const promise = account.createVerification('https://example.com');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.create('[USER_ID]', 'email@example.com', 'password');
|
||||
const promise = account.create('[USER_ID]', 'email@example.com', 'password');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.deleteSession('[SESSION_ID]');
|
||||
const promise = account.deleteSession('[SESSION_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.deleteSessions();
|
||||
const promise = account.deleteSessions();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.getLogs();
|
||||
const promise = account.getLogs();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.getPrefs();
|
||||
const promise = account.getPrefs();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.getSession('[SESSION_ID]');
|
||||
const promise = account.getSession('[SESSION_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.getSessions();
|
||||
const promise = account.getSessions();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.get();
|
||||
const promise = account.get();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updateEmail('email@example.com', 'password');
|
||||
const promise = account.updateEmail('email@example.com', 'password');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updateMagicURLSession('[USER_ID]', '[SECRET]');
|
||||
const promise = account.updateMagicURLSession('[USER_ID]', '[SECRET]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updateName('[NAME]');
|
||||
const promise = account.updateName('[NAME]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updatePassword('password');
|
||||
const promise = account.updatePassword('password');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updatePhoneSession('[USER_ID]', '[SECRET]');
|
||||
const promise = account.updatePhoneSession('[USER_ID]', '[SECRET]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updatePhoneVerification('[USER_ID]', '[SECRET]');
|
||||
const promise = account.updatePhoneVerification('[USER_ID]', '[SECRET]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updatePhone('', 'password');
|
||||
const promise = account.updatePhone('', 'password');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updatePrefs({});
|
||||
const promise = account.updatePrefs({});
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password');
|
||||
const promise = account.updateRecovery('[USER_ID]', '[SECRET]', 'password', 'password');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updateSession('[SESSION_ID]');
|
||||
const promise = account.updateSession('[SESSION_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updateStatus();
|
||||
const promise = account.updateStatus();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Account } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const account = new Account(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.account.updateVerification('[USER_ID]', '[SECRET]');
|
||||
const promise = account.updateVerification('[USER_ID]', '[SECRET]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Avatars } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const avatars = new Avatars(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let result = sdk.avatars.getBrowser('aa');
|
||||
const result = avatars.getBrowser('aa');
|
||||
|
||||
console.log(result); // Resource URL
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Avatars } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const avatars = new Avatars(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let result = sdk.avatars.getCreditCard('amex');
|
||||
const result = avatars.getCreditCard('amex');
|
||||
|
||||
console.log(result); // Resource URL
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Avatars } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const avatars = new Avatars(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let result = sdk.avatars.getFavicon('https://example.com');
|
||||
const result = avatars.getFavicon('https://example.com');
|
||||
|
||||
console.log(result); // Resource URL
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Avatars } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const avatars = new Avatars(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let result = sdk.avatars.getFlag('af');
|
||||
const result = avatars.getFlag('af');
|
||||
|
||||
console.log(result); // Resource URL
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Avatars } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const avatars = new Avatars(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let result = sdk.avatars.getImage('https://example.com');
|
||||
const result = avatars.getImage('https://example.com');
|
||||
|
||||
console.log(result); // Resource URL
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Avatars } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const avatars = new Avatars(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let result = sdk.avatars.getInitials();
|
||||
const result = avatars.getInitials();
|
||||
|
||||
console.log(result); // Resource URL
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Avatars } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const avatars = new Avatars(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let result = sdk.avatars.getQR('[TEXT]');
|
||||
const result = avatars.getQR('[TEXT]');
|
||||
|
||||
console.log(result); // Resource URL
|
||||
@@ -1,14 +0,0 @@
|
||||
const sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.database.createDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {});
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
||||
@@ -1,14 +0,0 @@
|
||||
const sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
||||
@@ -1,14 +0,0 @@
|
||||
const sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
||||
@@ -1,14 +0,0 @@
|
||||
const sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.database.listDocuments('[COLLECTION_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
||||
@@ -1,14 +0,0 @@
|
||||
const sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', {});
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Functions } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const functions = new Functions(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.functions.createExecution('[FUNCTION_ID]');
|
||||
const promise = functions.createExecution('[FUNCTION_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Functions } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const functions = new Functions(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]');
|
||||
const promise = functions.getExecution('[FUNCTION_ID]', '[EXECUTION_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Functions } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const functions = new Functions(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.functions.listExecutions('[FUNCTION_ID]');
|
||||
const promise = functions.listExecutions('[FUNCTION_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Functions } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const functions = new Functions(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]');
|
||||
const promise = functions.retryBuild('[FUNCTION_ID]', '[DEPLOYMENT_ID]', '[BUILD_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Locale } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const locale = new Locale(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.locale.getContinents();
|
||||
const promise = locale.getContinents();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Locale } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const locale = new Locale(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.locale.getCountriesEU();
|
||||
const promise = locale.getCountriesEU();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Locale } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const locale = new Locale(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.locale.getCountriesPhones();
|
||||
const promise = locale.getCountriesPhones();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Locale } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const locale = new Locale(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.locale.getCountries();
|
||||
const promise = locale.getCountries();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Locale } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const locale = new Locale(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.locale.getCurrencies();
|
||||
const promise = locale.getCurrencies();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Locale } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const locale = new Locale(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.locale.getLanguages();
|
||||
const promise = locale.getLanguages();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Locale } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const locale = new Locale(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.locale.get();
|
||||
const promise = locale.get();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Storage } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const storage = new Storage(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]);
|
||||
const promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', document.getElementById('uploader').files[0]);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Storage } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const storage = new Storage(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.storage.deleteFile('[BUCKET_ID]', '[FILE_ID]');
|
||||
const promise = storage.deleteFile('[BUCKET_ID]', '[FILE_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Storage } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const storage = new Storage(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let result = sdk.storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]');
|
||||
const result = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]');
|
||||
|
||||
console.log(result); // Resource URL
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Storage } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const storage = new Storage(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let result = sdk.storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]');
|
||||
const result = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]');
|
||||
|
||||
console.log(result); // Resource URL
|
||||
@@ -1,10 +1,14 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Storage } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const storage = new Storage(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let result = sdk.storage.getFileView('[BUCKET_ID]', '[FILE_ID]');
|
||||
const result = storage.getFileView('[BUCKET_ID]', '[FILE_ID]');
|
||||
|
||||
console.log(result); // Resource URL
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Storage } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const storage = new Storage(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.storage.getFile('[BUCKET_ID]', '[FILE_ID]');
|
||||
const promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Storage } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const storage = new Storage(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.storage.listFiles('[BUCKET_ID]');
|
||||
const promise = storage.listFiles('[BUCKET_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Storage } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const storage = new Storage(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.storage.updateFile('[BUCKET_ID]', '[FILE_ID]');
|
||||
const promise = storage.updateFile('[BUCKET_ID]', '[FILE_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com');
|
||||
const promise = teams.createMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.create('[TEAM_ID]', '[NAME]');
|
||||
const promise = teams.create('[TEAM_ID]', '[NAME]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]');
|
||||
const promise = teams.deleteMembership('[TEAM_ID]', '[MEMBERSHIP_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.delete('[TEAM_ID]');
|
||||
const promise = teams.delete('[TEAM_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]');
|
||||
const promise = teams.getMembership('[TEAM_ID]', '[MEMBERSHIP_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.getMemberships('[TEAM_ID]');
|
||||
const promise = teams.getMemberships('[TEAM_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.get('[TEAM_ID]');
|
||||
const promise = teams.get('[TEAM_ID]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.list();
|
||||
const promise = teams.list();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []);
|
||||
const promise = teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []);
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]');
|
||||
const promise = teams.updateMembershipStatus('[TEAM_ID]', '[MEMBERSHIP_ID]', '[USER_ID]', '[SECRET]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
const sdk = new Appwrite();
|
||||
import { Client, Teams } from "appwrite";
|
||||
|
||||
sdk
|
||||
const client = new Client();
|
||||
|
||||
const teams = new Teams(client);
|
||||
|
||||
client
|
||||
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
;
|
||||
|
||||
let promise = sdk.teams.update('[TEAM_ID]', '[NAME]');
|
||||
const promise = teams.update('[TEAM_ID]', '[NAME]');
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
appwrite database createBooleanAttribute \
|
||||
--collectionId [COLLECTION_ID] \
|
||||
--key '' \
|
||||
--required false \
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
appwrite database createCollection \
|
||||
--collectionId [COLLECTION_ID] \
|
||||
--name [NAME] \
|
||||
--permission document \
|
||||
--read "role:all" \
|
||||
--write "role:all"
|
||||
@@ -1,6 +0,0 @@
|
||||
appwrite database createDocument \
|
||||
--collectionId [COLLECTION_ID] \
|
||||
--documentId [DOCUMENT_ID] \
|
||||
--data '{ "key": "value" }' \
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
appwrite database createEmailAttribute \
|
||||
--collectionId [COLLECTION_ID] \
|
||||
--key '' \
|
||||
--required false \
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
appwrite database createEnumAttribute \
|
||||
--collectionId [COLLECTION_ID] \
|
||||
--key '' \
|
||||
--elements one two three \
|
||||
--required false \
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
appwrite database createFloatAttribute \
|
||||
--collectionId [COLLECTION_ID] \
|
||||
--key '' \
|
||||
--required false \
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
appwrite database createIndex \
|
||||
--collectionId [COLLECTION_ID] \
|
||||
--key '' \
|
||||
--type key \
|
||||
--attributes one two three \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user