Play Console and others
This commit is contained in:
@@ -11,6 +11,8 @@ namespace Jugenddienst_Stunden.Models
|
||||
{
|
||||
internal class Stunde : ObservableObject {
|
||||
|
||||
|
||||
|
||||
//Default-Werte zum Testen
|
||||
|
||||
//Katharina
|
||||
@@ -29,6 +31,7 @@ namespace Jugenddienst_Stunden.Models
|
||||
//private static readonly string requestUrl = $"{BaseAddress}/appapi?hours";
|
||||
|
||||
public DateTime Date { get; set; }
|
||||
private static Hours Hours { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -38,9 +41,11 @@ namespace Jugenddienst_Stunden.Models
|
||||
//apiKey = "MTAyfEJZZnB1L3VwcnhoVms0dDlLZENPZWtUVy85b3xodHRwOi8vaG91cnMuZGF1bmkubWluZS5udTo4MS9hcHBhcGk=";
|
||||
//name = "Kathi";
|
||||
//surname = "Wegi";
|
||||
|
||||
//apiKey = "MTQzfEFlMVRjQXdZMnI4RmpxZ0FSY3A0VEN2bVZYVXxodHRwOi8vaG91cnMuZGF1bmkubWluZS5udTo4MS9hcHBhcGk=";
|
||||
//name = "Chri";
|
||||
//surname = "Fe";
|
||||
|
||||
//apiKey = "MTI3fDEyYURVdHVZVWRaZk91eDlNcjZDUFlTdmdkNHxodHRwOi8vaG91cnMuZGF1bmkubWluZS5udTo4MS9hcHBhcGk=";
|
||||
//name = "Ju";
|
||||
//surname = "Ze";
|
||||
@@ -49,6 +54,10 @@ namespace Jugenddienst_Stunden.Models
|
||||
//name = "Le";
|
||||
//surname = "Ma";
|
||||
|
||||
//apiKey = "OXxpM0lQcXcySUp0S3hHbzFSb3VqdStwRXlDQmd8aHR0cHM6Ly9ob3Vycy5waWRhLmluZm8vYXBwYXBp";
|
||||
//name = "Eli";
|
||||
//surname = "Gap";
|
||||
|
||||
|
||||
//Preferences.Default.Set("apiKey", apiKey);
|
||||
//Preferences.Default.Set("name", name);
|
||||
@@ -65,7 +74,7 @@ namespace Jugenddienst_Stunden.Models
|
||||
var tokendata = new TokenData(apiKey);
|
||||
|
||||
//string data = await Auth.GetApiDataWithAuthAsync(requestUrl, apiKey);
|
||||
string data = await Auth.GetApiDataWithAuthAsync(tokendata.url + "?hours&month=8", tokendata.apiKey);
|
||||
string data = await Auth.GetApiDataWithAuthAsync(tokendata.url + "?hours&month="+DateTime.Today.Month, tokendata.apiKey);
|
||||
|
||||
if (data == null) {
|
||||
throw new Exception("Keine Daten erhalten");
|
||||
@@ -112,10 +121,31 @@ namespace Jugenddienst_Stunden.Models
|
||||
|
||||
|
||||
}
|
||||
Hours = hours;
|
||||
return hours;
|
||||
}
|
||||
|
||||
public static DayTime LoadEntry(int id) {
|
||||
|
||||
DayTime hours = Hours.daytime.Find(x => x.id == id);
|
||||
|
||||
return hours;
|
||||
}
|
||||
|
||||
|
||||
public static Stunde Load(string filename) {
|
||||
filename = System.IO.Path.Combine(FileSystem.AppDataDirectory, filename);
|
||||
|
||||
if (!File.Exists(filename))
|
||||
throw new FileNotFoundException("Unable to find file on local storage.", filename);
|
||||
|
||||
return
|
||||
new() {
|
||||
//Filename = Path.GetFileName(filename),
|
||||
//Text = File.ReadAllText(filename),
|
||||
Date = File.GetLastWriteTime(filename)
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user