Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ appwrite init function

## Supported runtimes

| Runtime | Versions | | | | |
|---------|----------|------|------|------|------|
| Node.js | 14.5 | 16.0 | 18.0 | 19.0 | 20.0 |
| Deno | 1.21 | 1.24 | 1.35 | | |
| Dart | 2.15 | 2.16 | 2.17 | 2.18 | 3.0 |
| Python | 3.8 | 3.9 | 3.10 | 3.11 | |
| PHP | 8.0 | 8.1 | 8.2 | | |
| Ruby | 3.0 | 3.1 | 3.2 | | |
| Swift | 5.5 | 5.8 | | | |
| C++ | 17 | 20 | | | |
| Java | 8.0 | 11.0 | 17.0 | 18.0 | |
| Kotlin | 1.6 | 1.8 | | | |
| .NET | 6.0 | 7.0 | | | |
| Bun | 1.0 | | | | |
| Runtime | Versions | | | | | |
|---------|----------|------|------|------|------|-----|
| Node.js | 14.5 | 16.0 | 18.0 | 19.0 | 20.0 | |
| Deno | 1.21 | 1.24 | 1.35 | | | |
| Dart | 2.15 | 2.16 | 2.17 | 2.18 | 3.0 | 3.1 |
| Python | 3.8 | 3.9 | 3.10 | 3.11 | | |
| PHP | 8.0 | 8.1 | 8.2 | | | |
| Ruby | 3.0 | 3.1 | 3.2 | | | |
| Swift | 5.5 | 5.8 | | | | |
| C++ | 17 | 20 | | | | |
| Java | 8.0 | 11.0 | 17.0 | 18.0 | | |
| Kotlin | 1.6 | 1.8 | | | | |
| .NET | 6.0 | 7.0 | | | | |
| Bun | 1.0 | | | | | |
2 changes: 1 addition & 1 deletion bun-1.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion bun-1.0/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async ({ req, res, log, error }: any) => {

// `res.json()` is a handy helper for sending JSON
return res.json({
motto: "Build Fast. Scale Big. All in One Place.",
motto: "Build like a team of hundreds_",
learn: "https://appwrite.io/docs",
connect: "https://appwrite.io/discord",
getInspired: "https://builtwith.appwrite.io",
Expand Down
2 changes: 1 addition & 1 deletion cpp-17/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion cpp-17/src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace runtime {

// `context.res.json()` is a handy helper for sending JSON
Json::Value response;
response["motto"] = "Build Fast. Scale Big. All in One Place.";
response["motto"] = "Build like a team of hundreds_";
response["learn"] = "https://appwrite.io/docs";
response["connect"] = "https://appwrite.io/discord";
response["getInspired"] = "https://builtwith.appwrite.io";
Expand Down
2 changes: 1 addition & 1 deletion cpp-20/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion cpp-20/src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace runtime {

// `context.res.json()` is a handy helper for sending JSON
Json::Value response;
response["motto"] = "Build Fast. Scale Big. All in One Place.";
response["motto"] = "Build like a team of hundreds_";
response["learn"] = "https://appwrite.io/docs";
response["connect"] = "https://appwrite.io/discord";
response["getInspired"] = "https://builtwith.appwrite.io";
Expand Down
2 changes: 1 addition & 1 deletion dart-2.15/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion dart-2.15/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Future<dynamic> main(final context) async {

// `res.json()` is a handy helper for sending JSON
return context.res.json({
'motto': 'Build Fast. Scale Big. All in One Place.',
'motto': 'Build like a team of hundreds_',
'learn': 'https://appwrite.io/docs',
'connect': 'https://appwrite.io/discord',
'getInspired': 'https://builtwith.appwrite.io',
Expand Down
2 changes: 1 addition & 1 deletion dart-2.16/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion dart-2.16/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Future<dynamic> main(final context) async {

// `res.json()` is a handy helper for sending JSON
return context.res.json({
'motto': 'Build Fast. Scale Big. All in One Place.',
'motto': 'Build like a team of hundreds_',
'learn': 'https://appwrite.io/docs',
'connect': 'https://appwrite.io/discord',
'getInspired': 'https://builtwith.appwrite.io',
Expand Down
2 changes: 1 addition & 1 deletion dart-2.17/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion dart-2.17/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Future<dynamic> main(final context) async {

// `res.json()` is a handy helper for sending JSON
return context.res.json({
'motto': 'Build Fast. Scale Big. All in One Place.',
'motto': 'Build like a team of hundreds_',
'learn': 'https://appwrite.io/docs',
'connect': 'https://appwrite.io/discord',
'getInspired': 'https://builtwith.appwrite.io',
Expand Down
2 changes: 1 addition & 1 deletion dart-2.18/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion dart-2.18/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Future<dynamic> main(final context) async {

// `res.json()` is a handy helper for sending JSON
return context.res.json({
'motto': 'Build Fast. Scale Big. All in One Place.',
'motto': 'Build like a team of hundreds_',
'learn': 'https://appwrite.io/docs',
'connect': 'https://appwrite.io/discord',
'getInspired': 'https://builtwith.appwrite.io',
Expand Down
2 changes: 1 addition & 1 deletion dart-2.19/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion dart-2.19/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Future<dynamic> main(final context) async {

// `res.json()` is a handy helper for sending JSON
return context.res.json({
'motto': 'Build Fast. Scale Big. All in One Place.',
'motto': 'Build like a team of hundreds_',
'learn': 'https://appwrite.io/docs',
'connect': 'https://appwrite.io/discord',
'getInspired': 'https://builtwith.appwrite.io',
Expand Down
2 changes: 1 addition & 1 deletion dart-3.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion dart-3.0/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Future<dynamic> main(final context) async {

// `res.json()` is a handy helper for sending JSON
return context.res.json({
'motto': 'Build Fast. Scale Big. All in One Place.',
'motto': 'Build like a team of hundreds_',
'learn': 'https://appwrite.io/docs',
'connect': 'https://appwrite.io/discord',
'getInspired': 'https://builtwith.appwrite.io',
Expand Down
27 changes: 27 additions & 0 deletions dart-3.1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# See https://www.dartlang.org/guides/libraries/private-files

# Files and directories created by pub
.dart_tool/
.packages
build/
# If you're building an application, you may want to check-in your pubspec.lock
pubspec.lock

# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/

# dotenv environment variables file
.env*

# Avoid committing generated Javascript files:
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
# project includes source files written in JavaScript.
*.js_
*.js.deps
*.js.map

.flutter-plugins
.flutter-plugins-dependencies
48 changes: 48 additions & 0 deletions dart-3.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# ⚡ Dart Starter Function

A simple starter function. Edit `lib/main.dart` to get started and create something awesome! 🚀

## 🧰 Usage

### GET /

- Returns a "Hello, World!" message.

**Response**

Sample `200` Response:

```text
Hello, World!
```

### POST, PUT, PATCH, DELETE /

- Returns a "Learn More" JSON response.

**Response**

Sample `200` Response:

```json
{
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
}
```

## ⚙️ Configuration

| Setting | Value |
|-------------------|-----------------|
| Runtime | Dart (3.1) |
| Entrypoint | `lib/main.dart` |
| Build Commands | `dart pub get` |
| Permissions | `any` |
| Timeout (Seconds) | 15 |

## 🔒 Environment Variables

No environment variables required.
1 change: 1 addition & 0 deletions dart-3.1/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include: package:lints/recommended.yaml
34 changes: 34 additions & 0 deletions dart-3.1/lib/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import 'dart:async';
import 'package:dart_appwrite/dart_appwrite.dart';

// This is your Appwrite function
// It's executed each time we get a request
Future<dynamic> main(final context) async {
// Why not try the Appwrite SDK?
//
// final client = Client()
// .setEndpoint('https://cloud.appwrite.io/v1')
// .setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
// .setKey(process.env.APPWRITE_API_KEY);

// You can log messages to the console
context.log('Hello, Logs!');

// If something goes wrong, log an error
context.error('Hello, Errors!');

// The `req` object contains the request data
if (context.req.method == 'GET') {
// Send a response with the res object helpers
// `res.send()` dispatches a string back to the client
return context.res.send('Hello, World!');
}

// `res.json()` is a handy helper for sending JSON
return context.res.json({
'motto': 'Build like a team of hundreds_',
'learn': 'https://appwrite.io/docs',
'connect': 'https://appwrite.io/discord',
'getInspired': 'https://builtwith.appwrite.io',
});
}
11 changes: 11 additions & 0 deletions dart-3.1/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: starter_template
version: 1.0.0

environment:
sdk: ^3.0.0

dependencies:
dart_appwrite: 8.0.0

dev_dependencies:
lints: ^2.0.0
2 changes: 1 addition & 1 deletion deno-1.21/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion deno-1.21/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async ({ req, res, log, error }: any) => {

// `res.json()` is a handy helper for sending JSON
return res.json({
motto: "Build Fast. Scale Big. All in One Place.",
motto: "Build like a team of hundreds_",
learn: "https://appwrite.io/docs",
connect: "https://appwrite.io/discord",
getInspired: "https://builtwith.appwrite.io",
Expand Down
2 changes: 1 addition & 1 deletion deno-1.24/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion deno-1.24/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async ({ req, res, log, error }: any) => {

// `res.json()` is a handy helper for sending JSON
return res.json({
motto: "Build Fast. Scale Big. All in One Place.",
motto: "Build like a team of hundreds_",
learn: "https://appwrite.io/docs",
connect: "https://appwrite.io/discord",
getInspired: "https://builtwith.appwrite.io",
Expand Down
2 changes: 1 addition & 1 deletion deno-1.35/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion deno-1.35/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async ({ req, res, log, error }: any) => {

// `res.json()` is a handy helper for sending JSON
return res.json({
motto: "Build Fast. Scale Big. All in One Place.",
motto: "Build like a team of hundreds_",
learn: "https://appwrite.io/docs",
connect: "https://appwrite.io/discord",
getInspired: "https://builtwith.appwrite.io",
Expand Down
2 changes: 1 addition & 1 deletion dotnet-6.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Sample `200` Response:

```json
{
"motto": "Build Fast. Scale Big. All in One Place.",
"motto": "Build like a team of hundreds_",
"learn": "https://appwrite.io/docs",
"connect": "https://appwrite.io/discord",
"getInspired": "https://builtwith.appwrite.io"
Expand Down
2 changes: 1 addition & 1 deletion dotnet-6.0/src/Index.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public async Task<RuntimeOutput> Main(RuntimeContext Context)
// `Context.Res.Json()` is a handy helper for sending JSON
return Context.Res.Json(new Dictionary<string, object?>()
{
{ "motto", "Build Fast. Scale Big. All in One Place." },
{ "motto", "Build like a team of hundreds_" },
{ "learn", "https://appwrite.io/docs" },
{ "connect", "https://appwrite.io/discord" },
{ "getInspired", "https://builtwith.appwrite.io" },
Expand Down
Loading