Skip to content

Commit

Permalink
chore: clean up docs for all APIs a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
joekickass committed Sep 16, 2024
1 parent ba08ea7 commit 528a45a
Show file tree
Hide file tree
Showing 13 changed files with 149 additions and 732 deletions.
39 changes: 12 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,31 @@
# RemotiveLabs RemotiveBroker GRPC APIs

This repo contains all public API from [RemotiveLabs](https://remotivelabs.com/) for integrating
with RemotiveBroker using your favourite programming language.
This repo contains all public API from [RemotiveLabs](https://remotivelabs.com/) for integrating with RemotiveBroker using your favourite
programming language.

We currently have pre-built GAPIC (Generated API Client) for python and grpc-web
but will add more moving forward.
We currently have pre-built GAPIC (Generated API Client) for a few languages, but will add more moving forward.

For other languages visit https://grpc.io/ to read up how to generate code for your
programming language based on our protocol buffer definition files
For other languages visit https://grpc.io/ to read up how to generate code for your programming language based on our protocol buffer
definition files.

## Protocol buffer definitions

Use these to generate GAPIC for your programming language.

- [Documentation and source code](protos/)
[Protobuf files](./protos/README.md)

## Python RemotiveBroker API
## Language specific APIs

Pre-built Python GAPIC + some extra helper functions

- [Documentation and source code](./python/remotivelabs-broker/)
- [Code samples](https://github.com/remotivelabs/remotivelabs-samples/tree/main/python)

## gRPC-web RemotiveBroker API

Pre-built gRPC-web RemotiveBroker GAPIC. gRPC-web is designed to run in browser and
not in nodejs. This is Javascipt+Typescript.

- [Documentation and source code](grpc-web/grpc-web-stubs)
- [Python](./python/remotivelabs-broker/)
- [gRPC-web](./grpc-web/README.md)
- [Rust](./rust/README.md)

## RemotiveBroker configuration schemas

[JSON schemas](schemas) of configuration files used by RemotiveBroker.

## Coming soon

Pre-built GAPIC for the following languages are coming shortly

* Java and Kotlin
* NodeJS

## Questions

Please use our discussion forum/community for any questions you might have <br>
Please use our discussion forum/community for any questions you might have:

https://github.com/remotivelabs/remotivelabs-community/discussions
63 changes: 47 additions & 16 deletions grpc-web/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,57 @@
# RemotiveLabs WEB-GRPC
# RemotiveBroker WEB-GRPC API

Web-grpc is javascript to be used in a browser context, not intended
to bu used with nodejs, read more here https://github.com/grpc/grpc-web
`remotivelabs-grpc-web-stubs` - Javascript SDK for interacting with the RemotiveBroker API in a browser context. Not intended to be used
with NodeJS.

## Grpc-web-stubs
Published to npm on [https://www.npmjs.com/package/remotivelabs-grpc-web-stubs](https://www.npmjs.com/package/remotivelabs-grpc-web-stubs).

[![npm version](https://img.shields.io/npm/v/remotivelabs-grpc-web-stubs.svg)](https://www.npmjs.com/package/remotivelabs-grpc-web-stubs)
## Getting started

Pre-built GRPC stubs generated from protobuf files
```bash
cd grpc-web/grpc-web-stubs

# install dependencies
yarn install

# TODO
```
npm install --save remotivelabs-grpc-web-stubs
```
or
```
yarn add remotivelabs-grpc-web-stubs

## Building

```bash
cd grpc-web/grpc-web-stubs

# Build docker image
docker build -t remotivelabs/grpc-web-generator .

# Generate typescript
./generate-ts.sh

# Generate javascript
./generate-js.sh
```

Read more: [grpc-web-stubs/](grpc-web-stubs/)
## Versioning

## Grpc-web-client
Versioning is done using `npm version`, see [Publishing](#publishing).

RemotiveBroker high-level client is coming soon. This API will be based on our
RemotiveBrokerApp that is using the grpc-web-stubs but adds layer on top to make
it simpler to use.
Follow [Semantic versioning](https://semver.org/). Beta versions should be suffixed with `-beta*`, example `0.2.0-beta1`.

## Publishing

Published to npm on [https://www.npmjs.com/package/remotivelabs-grpc-web-stubs](https://www.npmjs.com/package/remotivelabs-grpc-web-stubs).

```bash
# generate stubs
./generate-ts.sh

# update version
npm version x.y.z

# commit version
git add .
git commit -m "release: Prepare a release for version x.y.z"

# publish
npm publish
```
41 changes: 16 additions & 25 deletions grpc-web/grpc-web-stubs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,35 @@
These are generated grpc-web stubs to be used in a browser context, not intended
to bu used with nodejs, read more here https://github.com/grpc/grpc-web

## Usage
## Installation

### Installation
```
npm install --save remotivelabs-grpc-web-stubs
```bash
yarn install --save remotivelabs-grpc-web-stubs
```

or
```

```bash
yarn add remotivelabs-grpc-web-stubs
```

### Import
```
## Usage

```javascript
import {SystemServiceClient} from 'remotivelabs-grpc-web-stubs'

const client = new SystemServiceClient(brokerUrl)
```

## Development

### Build grpc-web-generator
## Examples

This image is on dockerhub so you do not have to build it
```sh
docker build -t remotivelabs/grpc-web-generator .
```

### Generate stubs
See [examples](./examples/README.md)

From this directory run the following commands and update `src/index.ts` to explicitly export types.
## License

```sh
sh ./generate-ts.sh
```
`remotivelabs-grpc-web-stubs` is distributed under the terms of the [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) license.

## Release Instructions
## Documentation

1. Commit changes.
2. Generate stubs `sh ./generate-ts.sh`.
3. Update version with `npm version x.y.z` and commit it with `release: Prepare a release for version x.y.z`.
4. Publish with `npm publish`.
TODO: We dont have any documentation
See [https://docs.remotivelabs.com/apis/python/remotivelabs/broker](https://docs.remotivelabs.com/apis/python/remotivelabs/broker).
1 change: 1 addition & 0 deletions grpc-web/grpc-web-stubs/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# `remotivelabs-grpc-web-stubs` examples
8 changes: 4 additions & 4 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# RemotiveLabs Broker API Python SDK
# RemotiveBroker Python API

`remotivelabs-broker` - Python SDK for interacting with the RemotiveLabs Broker.
`remotivelabs-broker` - Python SDK for interacting with the RemotiveBroker API.

Published to PyPI on [https://pypi.org/project/remotivelabs-broker/](https://pypi.org/project/remotivelabs-broker/)
Published to PyPI on [https://pypi.org/project/remotivelabs-broker/](https://pypi.org/project/remotivelabs-broker/).

## Getting started

Expand Down Expand Up @@ -49,7 +49,7 @@ Building the complete package, including protobuf stubs and documentation, is do

Update the package version by editing the following `pyproject.toml` file.

Follow [Semantic versioning](https://semver.org/). Beta versions should be suffixed with `b*`, example `0.2.0b1`.
Follow [Semantic versioning](https://semver.org/). Beta versions should be suffixed with `-beta*`, example `0.2.0-beta1`.

## Publishing

Expand Down
Loading

0 comments on commit 528a45a

Please sign in to comment.