PredictionAPIClient class
- Extends
Constructors
| Prediction |
Initializes a new instance of the PredictionAPIClient class. |
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, msRest.ServiceClientOptions)
Initializes a new instance of the PredictionAPIClient class.
new PredictionAPIClient(credentials: ServiceClientCredentials, endpoint: string, options?: msRest.ServiceClientOptions)
Parameters
- credentials
-
ServiceClientCredentials
Subscription credentials which uniquely identify client subscription.
- endpoint
-
string
Supported Cognitive Services endpoints.
- options
- msRest.ServiceClientOptions
Property Details
credentials
credentials: ServiceClientCredentials
Property Value
ServiceClientCredentials
endpoint
endpoint: string
Property Value
string
Method Details
classifyImage(string, string, msRest.HttpRequestBody, Models.PredictionAPIClientClassifyImageOptionalParams)
function classifyImage(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, options?: Models.PredictionAPIClientClassifyImageOptionalParams): Promise<Models.ClassifyImageResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- options
- Models.PredictionAPIClientClassifyImageOptionalParams
Returns
Promise<Models.ClassifyImageResponse>
Promise<Models.ClassifyImageResponse>
classifyImage(string, string, msRest.HttpRequestBody, PredictionAPIClientClassifyImageOptionalParams, ServiceCallback<ImagePrediction>)
function classifyImage(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, options: PredictionAPIClientClassifyImageOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
- callback
-
ServiceCallback<ImagePrediction>
The callback
classifyImage(string, string, msRest.HttpRequestBody, ServiceCallback<ImagePrediction>)
function classifyImage(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- callback
-
ServiceCallback<ImagePrediction>
The callback
classifyImageUrl(string, string, ImageUrl, Models.PredictionAPIClientClassifyImageUrlOptionalParams)
function classifyImageUrl(projectId: string, publishedName: string, imageUrl: ImageUrl, options?: Models.PredictionAPIClientClassifyImageUrlOptionalParams): Promise<Models.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.
- options
- Models.PredictionAPIClientClassifyImageUrlOptionalParams
Returns
Promise<Models.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
-
ServiceCallback<ImagePrediction>
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
-
ServiceCallback<ImagePrediction>
The callback
classifyImageUrlWithNoStore(string, string, ImageUrl, Models.PredictionAPIClientClassifyImageUrlWithNoStoreOptionalParams)
function classifyImageUrlWithNoStore(projectId: string, publishedName: string, imageUrl: ImageUrl, options?: Models.PredictionAPIClientClassifyImageUrlWithNoStoreOptionalParams): Promise<Models.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.
- options
- Models.PredictionAPIClientClassifyImageUrlWithNoStoreOptionalParams
Returns
Promise<Models.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
-
ServiceCallback<ImagePrediction>
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
-
ServiceCallback<ImagePrediction>
The callback
classifyImageWithNoStore(string, string, msRest.HttpRequestBody, Models.PredictionAPIClientClassifyImageWithNoStoreOptionalParams)
function classifyImageWithNoStore(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, options?: Models.PredictionAPIClientClassifyImageWithNoStoreOptionalParams): Promise<Models.ClassifyImageWithNoStoreResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- options
- Models.PredictionAPIClientClassifyImageWithNoStoreOptionalParams
Returns
Promise<Models.ClassifyImageWithNoStoreResponse>
Promise<Models.ClassifyImageWithNoStoreResponse>
classifyImageWithNoStore(string, string, msRest.HttpRequestBody, PredictionAPIClientClassifyImageWithNoStoreOptionalParams, ServiceCallback<ImagePrediction>)
function classifyImageWithNoStore(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, options: PredictionAPIClientClassifyImageWithNoStoreOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
- callback
-
ServiceCallback<ImagePrediction>
The callback
classifyImageWithNoStore(string, string, msRest.HttpRequestBody, ServiceCallback<ImagePrediction>)
function classifyImageWithNoStore(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- callback
-
ServiceCallback<ImagePrediction>
The callback
detectImage(string, string, msRest.HttpRequestBody, Models.PredictionAPIClientDetectImageOptionalParams)
function detectImage(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, options?: Models.PredictionAPIClientDetectImageOptionalParams): Promise<Models.DetectImageResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- options
- Models.PredictionAPIClientDetectImageOptionalParams
Returns
Promise<Models.DetectImageResponse>
Promise<Models.DetectImageResponse>
detectImage(string, string, msRest.HttpRequestBody, PredictionAPIClientDetectImageOptionalParams, ServiceCallback<ImagePrediction>)
function detectImage(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, options: PredictionAPIClientDetectImageOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
- callback
-
ServiceCallback<ImagePrediction>
The callback
detectImage(string, string, msRest.HttpRequestBody, ServiceCallback<ImagePrediction>)
function detectImage(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- callback
-
ServiceCallback<ImagePrediction>
The callback
detectImageUrl(string, string, ImageUrl, Models.PredictionAPIClientDetectImageUrlOptionalParams)
function detectImageUrl(projectId: string, publishedName: string, imageUrl: ImageUrl, options?: Models.PredictionAPIClientDetectImageUrlOptionalParams): Promise<Models.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.
- options
- Models.PredictionAPIClientDetectImageUrlOptionalParams
Returns
Promise<Models.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
-
ServiceCallback<ImagePrediction>
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
-
ServiceCallback<ImagePrediction>
The callback
detectImageUrlWithNoStore(string, string, ImageUrl, Models.PredictionAPIClientDetectImageUrlWithNoStoreOptionalParams)
function detectImageUrlWithNoStore(projectId: string, publishedName: string, imageUrl: ImageUrl, options?: Models.PredictionAPIClientDetectImageUrlWithNoStoreOptionalParams): Promise<Models.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.
- options
- Models.PredictionAPIClientDetectImageUrlWithNoStoreOptionalParams
Returns
Promise<Models.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
-
ServiceCallback<ImagePrediction>
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
-
ServiceCallback<ImagePrediction>
The callback
detectImageWithNoStore(string, string, msRest.HttpRequestBody, Models.PredictionAPIClientDetectImageWithNoStoreOptionalParams)
function detectImageWithNoStore(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, options?: Models.PredictionAPIClientDetectImageWithNoStoreOptionalParams): Promise<Models.DetectImageWithNoStoreResponse>
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- options
- Models.PredictionAPIClientDetectImageWithNoStoreOptionalParams
Returns
Promise<Models.DetectImageWithNoStoreResponse>
Promise<Models.DetectImageWithNoStoreResponse>
detectImageWithNoStore(string, string, msRest.HttpRequestBody, PredictionAPIClientDetectImageWithNoStoreOptionalParams, ServiceCallback<ImagePrediction>)
function detectImageWithNoStore(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, options: PredictionAPIClientDetectImageWithNoStoreOptionalParams, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
The optional parameters
- callback
-
ServiceCallback<ImagePrediction>
The callback
detectImageWithNoStore(string, string, msRest.HttpRequestBody, ServiceCallback<ImagePrediction>)
function detectImageWithNoStore(projectId: string, publishedName: string, imageData: msRest.HttpRequestBody, callback: ServiceCallback<ImagePrediction>)
Parameters
- projectId
-
string
The project id.
- publishedName
-
string
Specifies the name of the model to evaluate against.
- imageData
- msRest.HttpRequestBody
Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
- callback
-
ServiceCallback<ImagePrediction>
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>
sendRequest(RequestPrepareOptions | WebResourceLike)
Send the provided httpRequest.
function sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise<HttpOperationResponse>
Parameters
- options
-
RequestPrepareOptions | WebResourceLike
Returns
Promise<HttpOperationResponse>