Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR cognitiveservices/data-plane/ComputerVision] Add areaOfInterest and detectObject to CV API #731

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 21 additions & 38 deletions packages/@azure/cognitiveservices-computervision/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
## An isomorphic javascript sdk for - ComputerVisionClient
# An isomorphic javascript sdk for - ComputerVisionClient
This project provides an isomorphic javascript package. Right now it supports:
- node.js version 6.x.x or higher
- browser javascript

This package contains an isomorphic SDK for ComputerVisionClient.

### Currently supported environments

- Node.js version 6.x.x or higher
- Browser JavaScript

### How to Install
## How to Install

- nodejs
```
npm install @azure/cognitiveservices-computervision
```

### How to use

#### nodejs - Authentication, client creation and listModels as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

```
npm install @azure/ms-rest-nodeauth
- browser
```html
<script type="text/javascript" src="@azure/cognitiveservices-computervision/dist/cognitiveservices-computervision.js"></script>
```

##### Sample code
## How to use

### nodejs - Authentication, client creation and listModels as an example written in TypeScript.

```ts
import * as msRest from "@azure/ms-rest-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import * as msRest from "ms-rest-js";
import * as msRestNodeAuth from "ms-rest-nodeauth";
import { ComputerVisionClient, ComputerVisionModels, ComputerVisionMappers } from "@azure/cognitiveservices-computervision";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

Expand All @@ -42,26 +35,16 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and listModels as an example written in JavaScript.

##### Install @azure/ms-rest-browserauth

```
npm install @azure/ms-rest-browserauth
```

##### Sample code

See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
### browser - Authentication, client creation and listModels as an example written in javascript.

- index.html
```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>@azure/cognitiveservices-computervision sample</title>
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/cognitiveservices-computervision/dist/cognitiveservices-computervision.js"></script>
<script type="text/javascript">
const subscriptionId = "<Subscription_Id>";
Expand All @@ -85,10 +68,10 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
});
</script>
</head>
<body></body>
<body>
</body>
</html>
```

## Related projects

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
# Related projects
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "@azure/ms-rest-js";
import * as msRest from "ms-rest-js";

const packageName = "@azure/cognitiveservices-computervision";
const packageVersion = "0.1.0";
Expand All @@ -19,7 +19,7 @@ export class ComputerVisionClientContext extends msRest.ServiceClient {

/**
* Initializes a new instance of the ComputerVisionClientContext class.
* @param endpoint Supported Cognitive Services endpoints
* @param endpoint Supported Cognitive Services endpoints.
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param [options] The parameter options
*/
Expand Down
Loading