diff options
author | TrueDoctor <d-kobert@web.de> | 2018-09-29 16:51:26 +0200 |
---|---|---|
committer | TrueDoctor <d-kobert@web.de> | 2018-09-29 16:51:26 +0200 |
commit | de0f076ef9ff546c9a90513259ad6c42cd2224b3 (patch) | |
tree | 995d766417fd2093d7950694ef17f3c84b7f1042 /DSACore | |
parent | 04912687127303fd270b61f131cf68fd4aaae956 (diff) |
added firebase api
Diffstat (limited to 'DSACore')
-rw-r--r-- | DSACore/Commands/CommandHandler.cs | 3 | ||||
-rw-r--r-- | DSACore/DSACore.csproj | 4 | ||||
-rw-r--r-- | DSACore/FireBase/Database.cs | 24 |
3 files changed, 28 insertions, 3 deletions
diff --git a/DSACore/Commands/CommandHandler.cs b/DSACore/Commands/CommandHandler.cs index 446f99e..4b6ca42 100644 --- a/DSACore/Commands/CommandHandler.cs +++ b/DSACore/Commands/CommandHandler.cs @@ -97,7 +97,6 @@ namespace DSACore.Commands private static string CheckCommand(string name, CommandTypes command, string waffe, int erschwernis = 0) { var chr = Dsa.GetCharacter(0); - throw new NotImplementedException("access char by id ore name and group id"); switch (command) { @@ -116,6 +115,8 @@ namespace DSACore.Commands } return $"{name} verwendet {waffe}"; + + throw new NotImplementedException("access char by id ore name and group id"); } } } diff --git a/DSACore/DSACore.csproj b/DSACore/DSACore.csproj index da2feec..ad760c2 100644 --- a/DSACore/DSACore.csproj +++ b/DSACore/DSACore.csproj @@ -2,6 +2,7 @@ <PropertyGroup> <TargetFramework>netcoreapp2.1</TargetFramework> + <StartupObject>DSACore.Program</StartupObject> </PropertyGroup> <ItemGroup> @@ -9,13 +10,12 @@ </ItemGroup> <ItemGroup> - <PackageReference Include="FirebaseDatabase.net" Version="3.3.3" /> - <PackageReference Include="FirebaseStorage.net" Version="1.0.2" /> <PackageReference Include="Microsoft.AspNetCore.App" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\DSALib\DSALib.csproj" /> + <ProjectReference Include="..\FireBase\FireBase.csproj" /> </ItemGroup> </Project> diff --git a/DSACore/FireBase/Database.cs b/DSACore/FireBase/Database.cs new file mode 100644 index 0000000..cd21c00 --- /dev/null +++ b/DSACore/FireBase/Database.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Firebase.Database; +using Firebase.Database.Query; + + +namespace DSACore.FireBase +{ + public static class Database + { + static Database() + { + var auth = "ABCDE"; // your app secret + var firebaseClient = new FirebaseClient( + "<URL>", + new FirebaseOptions + { + AuthTokenAsyncFactory = () => Task.FromResult(auth) + }); + } + } +} |