Skip to content

Commit

Permalink
update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
YoDaMa committed May 14, 2021
1 parent 98904a5 commit f4e6792
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 41 deletions.
42 changes: 3 additions & 39 deletions sdk/iot/modelsrepository/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Azure IoT Models Repository client library for JavaScript

This package contains an isomorphic Client Library for Azure IoT Models Repository in Javascript. Use the Azure IoT Models Repository library for Javascript to pull DTDL files from remote endpoints.
This package contains an isomorphic Client Library for Azure IoT Models Repository in JavaScript. Use the Azure IoT Models Repository library for JavaScript to pull DTDL files from remote endpoints.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/iot/modelsrepository) |
[Package (npm)](https://www.npmjs.com/package/@azure/iot-modelsrepository/) |
Expand All @@ -12,7 +12,7 @@ This package contains an isomorphic Client Library for Azure IoT Models Reposito

## Key concepts

The Azure IoT Models Repository library for Javascript is written to interact with the Azure IoT PlugAndPlay Models Repository, for those developers who wish to write applications in Javascript to do so.
The Azure IoT Models Repository library for JavaScript is written to interact with the Azure IoT PlugAndPlay Models Repository, for those developers who wish to write applications in JavaScript to do so.

### Currently supported environments

Expand Down Expand Up @@ -41,37 +41,6 @@ const result = await client.getModels("dtmi:azure:DeviceManagement:DeviceInforma
console.log(result);
```

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

### Sample code

- index.html

```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>@azure/iot-modelsrepository sample</title>
<script src="node_modules/@azure/iot-modelsrepository/dist/client.browser.js"></script>
<script type="text/javascript">
const dtmi = "<Subscription_Id>";
const repositoryLocation = "<Repository_Location>";
// async / await OR chaining can be used.
const client = new Azure.IotModelsrepositoryClient.ModelsRepositoryClient(repositoryLocation);
client
.getModels(dtmi)
.then((result) => {
console.log(`The result is: ${result}`);
})
.catch((err) => {
console.log(`An error occured: ${err}`);
});
</script>
</head>
<body></body>
</html>
```

-----------------------------------------

# Troubleshooting
Expand All @@ -86,7 +55,7 @@ console.log(result);

# Related projects

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

# Contributing

Expand All @@ -102,8 +71,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

<!-- LINKS -->

[azure_portal]: https://portal.azure.com
[npm]: https://www.npmjs.com/
[iot_pnp_docs]: https://docs.microsoft.com/en-us/azure/iot-pnp/
4 changes: 2 additions & 2 deletions sdk/iot/modelsrepository/samples/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ urlFragment: template-typescript

The Azure IoT Models Repository enables builders to manage and share digital twin models for global consumption. The models are [JSON-LD](https://json-ld.org/) documents defined using the Digital Twins Definition Language [(DTDL)](https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md).

For more info about the Azure IoT Models Repository checkout the [docs](https://docs.microsoft.com/en-us/azure/iot-pnp/concepts-model-repository).
For more info about the Azure IoT Models Repository checkout the [docs](https://docs.microsoft.com/azure/iot-pnp/concepts-model-repository).


| **File Name** | **Description** |
Expand Down Expand Up @@ -63,7 +63,7 @@ If you need to override pipeline behavior, such as provide your own HttpClient i

## Publish Models

Publishing models to the models repository requires [exercising](https://docs.microsoft.com/en-us/azure/iot-pnp/concepts-model-repository#publish-a-model) common GitHub workflows.
Publishing models to the models repository requires [exercising](https://docs.microsoft.com/azure/iot-pnp/concepts-model-repository#publish-a-model) common GitHub workflows.

## Get Models

Expand Down

0 comments on commit f4e6792

Please sign in to comment.