Esempio n. 1
0
        public void ToString_ContainsBrandId()
        {
            var uri    = new RetrieveBrandUri("myId", "myKey", "brandId");
            var result = uri.ToString();

            Assert.IsTrue(result.Contains("brand/brandId"));
        }
Esempio n. 2
0
        public void ToString_ContainsAppId()
        {
            var uri    = new RetrieveBrandUri("myId", "myKey", "itemId");
            var result = uri.ToString();

            Assert.IsTrue(result.Contains("appId=myId"));
        }
Esempio n. 3
0
        /// <summary>
        /// Retrieves the specified brand from the Nutritionix API
        /// </summary>
        /// <param name="id">The brand id</param>
        /// <returns>The requested brand or null</returns>
        /// <exception cref="Nutritionix.NutritionixException"/>
        public Brand RetrieveBrand(string id)
        {
            CheckInitialized();

            var itemUri = new RetrieveBrandUri(_appId, _appKey, id);

            return(Get <Brand>(itemUri));
        }