Dart Functions upgrade for Appwrite Functions v2#313
Dart Functions upgrade for Appwrite Functions v2#313lohanidamodar wants to merge 13 commits intomasterfrom
Conversation
…-for-functions into dart-functions-v2
| To package this example as a cloud function, follow these steps. | ||
|
|
||
| ```bash | ||
| $ cd demos-for-functions/dart/file_backup |
There was a problem hiding this comment.
Let's check this command in all readmes, should be V2
| To package this example as a cloud function, follow these steps. | ||
|
|
||
| ```bash | ||
| $ cd demos-for-functions/dart/file_backup |
There was a problem hiding this comment.
Let's check with Eldad. Do we call it V2? I think we use naming convention Gen2 (generation 2)
| $ cd .. | ||
| $ tar -zcvf code.tar.gz file_backup |
There was a problem hiding this comment.
Can we please test this once? I remember reports from Discord that people didn't get function working when tarring from outside of the folder. They had to tar it from inside and use . to get it working.
Could be fake alert, but lets please check.
| * Upload the tarfile to your Appwrite Console and use the following entrypoint command | ||
|
|
||
| ```bash | ||
| dart main.dart | ||
| ``` |
There was a problem hiding this comment.
Entrypoint, not Entrypoint command
main.dart, not dart main.dart.
Same goes for all readmes.
| * Upload the tarfile to your Appwrite Console and use the following entrypoint command | ||
|
|
||
| ```bash | ||
| dart main.dart |
There was a problem hiding this comment.
In opr-examples we always put code in a source folder. Do we want to do it here for consistency? So the file would be lib/main.dart: https://github.com/open-runtimes/examples/blob/main/dart/convert-phone-number-to-country-name/lib/main.dart
|
|
||
| ## 🎯 Trigger | ||
|
|
||
| Head over to your function in the Appwrite console and under the Settings Tab, enable the `storage.files.create` event. |
There was a problem hiding this comment.
Event were refactored. Can we update these notes?
|
|
||
| Since we are retrieving an url from the API, the GIPHY API is more than enough for our needs. | ||
|
|
||
| ## ☁️ Create a new Function |
There was a problem hiding this comment.
Lets add this title to all readmes, or remove it from here
| ..setEndpoint(endpoint) | ||
| ..setProject(env['APPWRITE_FUNCTION_PROJECT_ID']) | ||
| ..setKey(env['APPWRITE_API_KEY']); | ||
|
|
There was a problem hiding this comment.
Not experienced with flutter, but are there supposed to be 2 dots?
No description provided.