예제 #1
0
        public static async Task <ObservableCollection <ModelResult> > GetDesignTimeUserDataAsync()
        {
            var jsonFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/SampleData/ExampleUserResponse.json"));

            string json = await FileIO.ReadTextAsync(jsonFile);

            var result = RemixUserListResponse.FromJson(json);

            return(new ObservableCollection <ModelResult>(result.Results));
        }
예제 #2
0
        public async Task <RemixUserListResponse> GetModelsForUserAsync(string userId, string continuationUrl = null)
        {
            string json = string.Empty;

            if (string.IsNullOrEmpty(continuationUrl))
            {
                // If starting from scratch for a new user
                json = await client.GetStringAsync($"{ApiRoot}/users/{userId}/uploads");
            }
            else
            {
                // If this is a continuation, there is a continuation token already prepared for us.
                // ex. "continuationUri": "hXXp://api.remix3d.com:443/v3/users/{userId}/uploads?%24continuationToken=xxxxxxxxxx."
                json = await client.GetStringAsync(continuationUrl);
            }

            return(RemixUserListResponse.FromJson(json));
        }