public async Task <List <UserActivity> > GetActivitySubscribers(Guid iD) { using (var request = InitRequest()) { return(await CachedFile.TryLoad <List <UserActivity> >($"{UrlBase}{UrlActivitySubscribers}/{iD}", new TimeSpan(0), false, true, request)); } }
public async Task <Activity> GetActivity(Guid iD) { using (var request = InitRequest()) { return(await CachedFile.TryLoad <Activity>($"{UrlBase}{UrlGetActivity}/{iD}", new TimeSpan(0), false, true, request)); } }
public async Task <User> GetCurrentUser() { using (var request = InitRequest()) { return(await CachedFile.TryLoad <User>(UrlBase + UrlUser + "/me", new TimeSpan(0), false, false, request)); } }
public async Task <List <User> > GetAllUsers() { using (var request = InitRequest()) { return(await CachedFile.TryLoad <List <User> >($"{UrlBase}{UrlUser}", new TimeSpan(0), false, false, request)); } }
public async Task <User> GetUser(Guid userID) { using (var request = InitRequest()) { return(await CachedFile.TryLoad <User>($"{UrlBase}{UrlUser}/{userID}", new TimeSpan(0, 5, 0), false, false, request)); } }
/// <summary> /// Get the list of all public activities /// </summary> /// <returns></returns> public async Task <List <Activity> > GetAllPublicActivities() { using (var request = InitRequest()) { return(await CachedFile.TryLoad <List <Activity> >(UrlBase + UrlActivities, new TimeSpan(0), false, false, request)); //var content = await request.GetStringAsync(UrlBase + UrlActivities); //return JsonConvert.DeserializeObject<List<Activity>>(content); } }
public async Task <bool> CheckCredentials() { using (var request = InitRequest()) { return(await CachedFile.TryLoad <bool>(UrlBase + UrlLogin, new TimeSpan(0), false, false, request)); //var content = await request.GetStringAsync(UrlBase + UrlLogin); //return JsonConvert.DeserializeObject<bool>(content); } }