docs: update javascript documentation
Closes
@@ -14,25 +14,17 @@ npm install --save @ory/hydra-client
#### Basic configuration
```js
-import { AdminApi } from '@ory/hydra-client'
+import { Configuration, PublicApi, AdminApi } from '@oryd/hydra-client';
-// Set this to Hydra's URL
-const hydraAdmin = new AdminApi('http://localhost:4445')
-```
-
-### API Usage
+const hydraPublic = new PublicApi(new Configuration({
+ basePath: "https://public.hydra:4444/"
+}));
-```js
-hydraAdmin.listOAuth2Clients(10, 0).then(({ body }) => {
- body.forEach((client) => {
- console.log(client)
- })
-})
+const hydraAdmin = new AdminApi(new Configuration({
+ basePath: "https://public.hydra:4445/"
+}));
```
-### API Docs
+### API Usage
-API docs are available
-[here](https://github.com/ory/hydra/blob/master/sdk/js/swagger/README.md).
-Please note that those docs are generated and may introduce bugs if code
-examples are used 1:1. Especially the package name is not correct.
+We recommend using TypeScript with auto-completion as API usage is not well documented currently.
