Skip to content

Commit

Permalink
[AutoPR] eventgrid/resource-manager (Azure#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
AutorestCI authored and kpajdzik committed Oct 19, 2018
1 parent 85ea5ca commit ddf743a
Show file tree
Hide file tree
Showing 20 changed files with 3,507 additions and 1,361 deletions.
16 changes: 8 additions & 8 deletions packages/@azure/arm-eventgrid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ npm install @azure/arm-eventgrid

## How to use

### nodejs - Authentication, client creation and get eventSubscriptions as an example written in TypeScript.
### nodejs - Authentication, client creation and get domains as an example written in TypeScript.

```ts
import * as msRest from "ms-rest-js";
Expand All @@ -24,9 +24,9 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new EventGridManagementClient(creds, subscriptionId);
const scope = "testscope";
const eventSubscriptionName = "testeventSubscriptionName";
client.eventSubscriptions.get(scope, eventSubscriptionName).then((result) => {
const resourceGroupName = "testresourceGroupName";
const domainName = "testdomainName";
client.domains.get(resourceGroupName, domainName).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -35,7 +35,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

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

- index.html
Expand All @@ -60,9 +60,9 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
authManager.login();
}
const client = new Azure.ArmEventgrid.EventGridManagementClient(res.creds, subscriptionId);
const scope = "testscope";
const eventSubscriptionName = "testeventSubscriptionName";
client.eventSubscriptions.get(scope, eventSubscriptionName).then((result) => {
const resourceGroupName = "testresourceGroupName";
const domainName = "testdomainName";
client.domains.get(resourceGroupName, domainName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down
Loading

0 comments on commit ddf743a

Please sign in to comment.