Example #1
0
 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));
     }
 }
Example #2
0
 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));
     }
 }
Example #3
0
 public async Task <User> GetCurrentUser()
 {
     using (var request = InitRequest())
     {
         return(await CachedFile.TryLoad <User>(UrlBase + UrlUser + "/me", new TimeSpan(0), false, false, request));
     }
 }
Example #4
0
 public async Task <List <User> > GetAllUsers()
 {
     using (var request = InitRequest())
     {
         return(await CachedFile.TryLoad <List <User> >($"{UrlBase}{UrlUser}", new TimeSpan(0), false, false, request));
     }
 }
Example #5
0
 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));
     }
 }
Example #6
0
        /// <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);
            }
        }
Example #7
0
        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);
            }
        }