Skip to content

Commit becc358

Browse files
authored
Merge pull request #3 from TorstenDittmann/feat-support-07
feat-support-07
2 parents e5505b5 + 80c20c7 commit becc358

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

Program.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,27 @@ List Documents
151151
Console.WriteLine($"Error: {e}");
152152
throw;
153153
}
154+
155+
/**
156+
List Functions
157+
*/
158+
Functions functions = new Functions(client);
159+
160+
try
161+
{
162+
Console.WriteLine("Running List Functions API");
163+
response = RunTask(functions.List()).GetAwaiter().GetResult();
164+
parsed = JObject.Parse(response);
165+
foreach (dynamic element in parsed["functions"])
166+
{
167+
Console.WriteLine($"- {element["name"]} ({element["env"]})");
168+
}
169+
}
170+
catch (System.Exception e)
171+
{
172+
Console.WriteLine($"Error: {e}");
173+
throw;
174+
}
154175
}
155176

156177
static async Task<string> RunTask(Task<HttpResponseMessage> task)

playground-for-dotnet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Appwrite" Version="0.0.3" />
10+
<PackageReference Include="Appwrite" Version="0.1.0" />
1111
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
1212
</ItemGroup>
1313

0 commit comments

Comments
 (0)