public void ToString_ContainsBrandId() { var uri = new RetrieveBrandUri("myId", "myKey", "brandId"); var result = uri.ToString(); Assert.IsTrue(result.Contains("brand/brandId")); }
public void ToString_ContainsAppId() { var uri = new RetrieveBrandUri("myId", "myKey", "itemId"); var result = uri.ToString(); Assert.IsTrue(result.Contains("appId=myId")); }
/// <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)); }