PredictionAPIClient class
- Extends
Constructors
Prediction |
Initializes a new instance of the PredictionAPIClient class. |
Inherited Properties
credentials | |
endpoint |
Methods
Inherited Methods
send |
Send an HTTP request that is populated using the provided OperationSpec. |
send |
Send the provided httpRequest. |
Constructor Details
PredictionAPIClient(ServiceClientCredentials, string, ServiceClientOptions)
Initializes a new instance of the PredictionAPIClient class.
new PredictionAPIClient(credentials: ServiceClientCredentials, endpoint: string, options?: ServiceClientOptions)
Parameters
- credentials
- ServiceClientCredentials
Subscription credentials which uniquely identify client subscription.
- endpoint
-
string
Supported Cognitive Services endpoints.
- options
- ServiceClientOptions
The parameter options
Inherited Property Details
credentials
credentials: ServiceClientCredentials
Property Value
Inherited From PredictionAPIClientContext.credentials
endpoint
Method Details
classifyImage(string, string, HttpRequestBody, PredictionAPIClientClassifyImageOptionalParams)
function classifyImage(projectId: string, publishedName: string, imageData: HttpRequestBody, options?: PredictionAPIClientClassifyImageOptionalParams): Promise<ClassifyImageResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
Returns
Promise<ClassifyImageResponse>
Promise<Models.ClassifyImageResponse>
classifyImage(string, string, HttpRequestBody, PredictionAPIClientClassifyImageOptionalParams, ServiceCallback<ImagePrediction>)
function classifyImage(projectId: string, publishedName: string, imageData: HttpRequestBody, options: PredictionAPIClientClassifyImageOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
- callback
The callback
classifyImage(string, string, HttpRequestBody, ServiceCallback<ImagePrediction>)
function classifyImage(projectId: string, publishedName: string, imageData: HttpRequestBody, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- callback
The callback
classifyImageUrl(string, string, ImageUrl, PredictionAPIClientClassifyImageUrlOptionalParams)
function classifyImageUrl(projectId: string, publishedName: string, imageUrl: ImageUrl, options?: PredictionAPIClientClassifyImageUrlOptionalParams): Promise<ClassifyImageUrlResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An ImageUrl that contains the url of the image to be evaluated.
The optional parameters
Returns
Promise<ClassifyImageUrlResponse>
Promise<Models.ClassifyImageUrlResponse>
classifyImageUrl(string, string, ImageUrl, PredictionAPIClientClassifyImageUrlOptionalParams, ServiceCallback<ImagePrediction>)
function classifyImageUrl(projectId: string, publishedName: string, imageUrl: ImageUrl, options: PredictionAPIClientClassifyImageUrlOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An ImageUrl that contains the url of the image to be evaluated.
The optional parameters
- callback
The callback
classifyImageUrl(string, string, ImageUrl, ServiceCallback<ImagePrediction>)
function classifyImageUrl(projectId: string, publishedName: string, imageUrl: ImageUrl, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An ImageUrl that contains the url of the image to be evaluated.
- callback
The callback
classifyImageUrlWithNoStore(string, string, ImageUrl, PredictionAPIClientClassifyImageUrlWithNoStoreOptionalParams)
function classifyImageUrlWithNoStore(projectId: string, publishedName: string, imageUrl: ImageUrl, options?: PredictionAPIClientClassifyImageUrlWithNoStoreOptionalParams): Promise<ClassifyImageUrlWithNoStoreResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated.
The optional parameters
Returns
Promise<ClassifyImageUrlWithNoStoreResponse>
Promise<Models.ClassifyImageUrlWithNoStoreResponse>
classifyImageUrlWithNoStore(string, string, ImageUrl, PredictionAPIClientClassifyImageUrlWithNoStoreOptionalParams, ServiceCallback<ImagePrediction>)
function classifyImageUrlWithNoStore(projectId: string, publishedName: string, imageUrl: ImageUrl, options: PredictionAPIClientClassifyImageUrlWithNoStoreOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated.
The optional parameters
- callback
The callback
classifyImageUrlWithNoStore(string, string, ImageUrl, ServiceCallback<ImagePrediction>)
function classifyImageUrlWithNoStore(projectId: string, publishedName: string, imageUrl: ImageUrl, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated.
- callback
The callback
classifyImageWithNoStore(string, string, HttpRequestBody, PredictionAPIClientClassifyImageWithNoStoreOptionalParams)
function classifyImageWithNoStore(projectId: string, publishedName: string, imageData: HttpRequestBody, options?: PredictionAPIClientClassifyImageWithNoStoreOptionalParams): Promise<ClassifyImageWithNoStoreResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
Returns
Promise<ClassifyImageWithNoStoreResponse>
Promise<Models.ClassifyImageWithNoStoreResponse>
classifyImageWithNoStore(string, string, HttpRequestBody, PredictionAPIClientClassifyImageWithNoStoreOptionalParams, ServiceCallback<ImagePrediction>)
function classifyImageWithNoStore(projectId: string, publishedName: string, imageData: HttpRequestBody, options: PredictionAPIClientClassifyImageWithNoStoreOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
- callback
The callback
classifyImageWithNoStore(string, string, HttpRequestBody, ServiceCallback<ImagePrediction>)
function classifyImageWithNoStore(projectId: string, publishedName: string, imageData: HttpRequestBody, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- callback
The callback
detectImage(string, string, HttpRequestBody, PredictionAPIClientDetectImageOptionalParams)
function detectImage(projectId: string, publishedName: string, imageData: HttpRequestBody, options?: PredictionAPIClientDetectImageOptionalParams): Promise<DetectImageResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
Returns
Promise<DetectImageResponse>
Promise<Models.DetectImageResponse>
detectImage(string, string, HttpRequestBody, PredictionAPIClientDetectImageOptionalParams, ServiceCallback<ImagePrediction>)
function detectImage(projectId: string, publishedName: string, imageData: HttpRequestBody, options: PredictionAPIClientDetectImageOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
- callback
The callback
detectImage(string, string, HttpRequestBody, ServiceCallback<ImagePrediction>)
function detectImage(projectId: string, publishedName: string, imageData: HttpRequestBody, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- callback
The callback
detectImageUrl(string, string, ImageUrl, PredictionAPIClientDetectImageUrlOptionalParams)
function detectImageUrl(projectId: string, publishedName: string, imageUrl: ImageUrl, options?: PredictionAPIClientDetectImageUrlOptionalParams): Promise<DetectImageUrlResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An ImageUrl that contains the url of the image to be evaluated.
The optional parameters
Returns
Promise<DetectImageUrlResponse>
Promise<Models.DetectImageUrlResponse>
detectImageUrl(string, string, ImageUrl, PredictionAPIClientDetectImageUrlOptionalParams, ServiceCallback<ImagePrediction>)
function detectImageUrl(projectId: string, publishedName: string, imageUrl: ImageUrl, options: PredictionAPIClientDetectImageUrlOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An ImageUrl that contains the url of the image to be evaluated.
The optional parameters
- callback
The callback
detectImageUrl(string, string, ImageUrl, ServiceCallback<ImagePrediction>)
function detectImageUrl(projectId: string, publishedName: string, imageUrl: ImageUrl, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An ImageUrl that contains the url of the image to be evaluated.
- callback
The callback
detectImageUrlWithNoStore(string, string, ImageUrl, PredictionAPIClientDetectImageUrlWithNoStoreOptionalParams)
function detectImageUrlWithNoStore(projectId: string, publishedName: string, imageUrl: ImageUrl, options?: PredictionAPIClientDetectImageUrlWithNoStoreOptionalParams): Promise<DetectImageUrlWithNoStoreResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated.
The optional parameters
Returns
Promise<DetectImageUrlWithNoStoreResponse>
Promise<Models.DetectImageUrlWithNoStoreResponse>
detectImageUrlWithNoStore(string, string, ImageUrl, PredictionAPIClientDetectImageUrlWithNoStoreOptionalParams, ServiceCallback<ImagePrediction>)
function detectImageUrlWithNoStore(projectId: string, publishedName: string, imageUrl: ImageUrl, options: PredictionAPIClientDetectImageUrlWithNoStoreOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated.
The optional parameters
- callback
The callback
detectImageUrlWithNoStore(string, string, ImageUrl, ServiceCallback<ImagePrediction>)
function detectImageUrlWithNoStore(projectId: string, publishedName: string, imageUrl: ImageUrl, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageUrl
- ImageUrl
An {Iris.Web.Api.Models.ImageUrl} that contains the url of the image to be evaluated.
- callback
The callback
detectImageWithNoStore(string, string, HttpRequestBody, PredictionAPIClientDetectImageWithNoStoreOptionalParams)
function detectImageWithNoStore(projectId: string, publishedName: string, imageData: HttpRequestBody, options?: PredictionAPIClientDetectImageWithNoStoreOptionalParams): Promise<DetectImageWithNoStoreResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
Returns
Promise<DetectImageWithNoStoreResponse>
Promise<Models.DetectImageWithNoStoreResponse>
detectImageWithNoStore(string, string, HttpRequestBody, PredictionAPIClientDetectImageWithNoStoreOptionalParams, ServiceCallback<ImagePrediction>)
function detectImageWithNoStore(projectId: string, publishedName: string, imageData: HttpRequestBody, options: PredictionAPIClientDetectImageWithNoStoreOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
- callback
The callback
detectImageWithNoStore(string, string, HttpRequestBody, ServiceCallback<ImagePrediction>)
function detectImageWithNoStore(projectId: string, publishedName: string, imageData: HttpRequestBody, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- callback
The callback
Inherited Method Details
sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)
Send an HTTP request that is populated using the provided OperationSpec.
function sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback<any>): Promise<RestResponse>
Parameters
- operationArguments
- OperationArguments
The arguments that the HTTP request's templated values will be populated from.
- operationSpec
- OperationSpec
The OperationSpec to use to populate the httpRequest.
- callback
-
ServiceCallback<any>
The callback to call when the response is received.
Returns
Promise<RestResponse>
Inherited From PredictionAPIClientContext.sendOperationRequest
sendRequest(RequestPrepareOptions | WebResourceLike)
Send the provided httpRequest.
function sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise<HttpOperationResponse>
Parameters
- options
Returns
Promise<HttpOperationResponse>
Inherited From PredictionAPIClientContext.sendRequest