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] eventgrid/resource-manager #225

Merged
merged 6 commits into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from 4 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
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