V3.1.0
nikunj-MindInventory
released this
17 May 10:32
·
25 commits
to main
since this release
V3.1.0
- Added Nutrition Advsior API
/// Use this method to configure Nutrition Advisor
/// - Parameters:
/// - licenceKey: Licence Key for configuration
/// - completion: NutritionAdvisorResult with sucess or error message
public func configure(licenceKey: String, completion: @escaping NutritionAdvisorStatus)
/// Initiate converstion with Nutrition Advisor
/// - Parameters:
/// - completion: NutritionAdvisorResult with sucess or error message
public func initConversation(completion: @escaping NutritionAdvisorStatus)
/// Use this method to send message to Nutrition Advisor
/// - Parameters:
/// - message: Message you want to send
/// - completion: NutritionAdvisor responds with a success or error response. If the response is successful, you will receive PassioAdvisorResponse containing food information.
public func sendMessage(message: String, completion: @escaping NutritionAdvisorResponse)
/// Use this method to send image to Nutrition Advisor
/// - Parameters:
/// - image: UIImage you want to send
/// - completion: NutritionAdvisor responds with a success or error response. If the response is successful, you will receive PassioAdvisorResponse containing food information.
public func sendImage(image: UIImage, completion: @escaping NutritionAdvisorResponse)
/// Use this method to fetch ingredients
/// - Parameters:
/// - advisorResponse: Pass PassioAdvisorResponse
/// - completion: NutritionAdvisor responds with a success or error response. If the response is successful, you will receive PassioAdvisorResponse containing food information.
public func fetchIngridients(from advisorResponse: PassioAdvisorResponse, completion: @escaping NutritionAdvisorResponse)
- Refactored Nutrition Facts API
/// Use this function to detect Nutrition Facts via pointing the camera at Nutrition Facts
/// - Parameters:
/// - nutritionfactsDelegate: Add self to implement the NutritionFactsDelegate
/// - completion: success or failure of the startNutritionFactsDetection
func startNutritionFactsDetection(
nutritionfactsDelegate: NutritionFactsDelegate?,
capturingDeviceType: CapturingDeviceType = .defaultCapturing(),
completion: @escaping (Bool) -> Void
)
- Added fetchFoodItemLegacy API
/// Fetch PassioFoodItem for a v2 PassioID
/// - Parameter passioID: PassioID
/// - Parameter completion: Receive a closure with optional PassioFoodItem
public func fetchFoodItemLegacy(from passioID: PassioID, completion: @escaping (PassioFoodItem?) -> Void)