public async Task <Mini> ParseFromUrl(Uri url)
        {
            string objectId = GetObjectIdFromUrl(url);

            MyMiniFactoryModel.RootObject myModel = await _myMiniFactoryClient.GetObject(objectId);

            if (myModel is null)
            {
                return(null);
            }

            Creator creator = new Creator
            {
                Name = myModel.designer.username
            };

            MyMiniFactorySource source = new MyMiniFactorySource(creator, myModel.designer.profile_url);

            creator.Sites.Add(source);

            int cost = 0;

            if (myModel.price != null)
            {
                cost = Convert.ToInt32(Math.Round(Convert.ToDouble(myModel.price.value)));
            }

            Mini mini = new Mini
            {
                Name    = myModel.name,
                Status  = Status.Unindexed,
                Cost    = cost,
                Link    = myModel.url,
                Creator = creator
            };

            mini.Thumbnail = myModel.images.Where(i => i.is_primary == true).FirstOrDefault().large.url;

            mini.Sources.Add(new MiniSourceSite(mini, source, url));

            return(mini);
        }
        public async Task <MyMiniFactoryModel.RootObject> GetObject(string objectId)
        {
            HttpResponseMessage response = await _httpClient.GetAsync($"objects/{objectId}?key={_apiKey}");

            HttpContent responseContent = response.Content;

            if (response.StatusCode == System.Net.HttpStatusCode.OK)
            {
                using (StreamReader reader = new StreamReader(await responseContent.ReadAsStreamAsync()))
                {
                    string result = await reader.ReadToEndAsync();

                    MyMiniFactoryModel.RootObject rootObject = JsonConvert.DeserializeObject <MyMiniFactoryModel.RootObject>(result);

                    return(rootObject);
                }
            }

            return(null);
        }