Skip to content

Commit

Permalink
feat(VisualRecognitionV3): Add acceptLanguage parameter to detectFaces()
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Oliveri committed Jan 15, 2019
1 parent ac32793 commit a260a9c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/VisualRecognitionV3/VisualRecognition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,15 @@ public class VisualRecognition {
recommended pixel density is 32X32 pixels per inch, and the maximum image size is 10 MB. Redirects are followed,
so you can use a shortened URL.
You can also include images with the **images_file** parameter.
- parameter acceptLanguage: The desired language of parts of the response. See the response for details.
- parameter imagesFileContentType: The content type of imagesFile.
- parameter headers: A dictionary of request headers to be sent with this request.
- parameter completionHandler: A function executed when the request completes with a successful result or error
*/
public func detectFaces(
imagesFile: URL? = nil,
url: String? = nil,
acceptLanguage: String? = nil,
imagesFileContentType: String? = nil,
headers: [String: String]? = nil,
completionHandler: @escaping (WatsonResponse<DetectedFaces>?, WatsonError?) -> Void)
Expand Down Expand Up @@ -288,6 +290,9 @@ public class VisualRecognition {
}
headerParameters["Accept"] = "application/json"
headerParameters["Content-Type"] = multipartFormData.contentType
if let acceptLanguage = acceptLanguage {
headerParameters["Accept-Language"] = acceptLanguage
}

// construct query parameters
var queryParameters = [URLQueryItem]()
Expand Down

0 comments on commit a260a9c

Please sign in to comment.