Skip to content

Commit

Permalink
feat: add typescript client library (#58)
Browse files Browse the repository at this point in the history
* chore: gen commands

* fix: schema namings

* chore: initial client build

* fix: take only relevant types

* fix: manual tests

* fix: response blob for inscription content

* docs: README
  • Loading branch information
rafaelcr committed May 9, 2023
1 parent e50931c commit 23e48f1
Show file tree
Hide file tree
Showing 20 changed files with 8,055 additions and 100 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
ecmaVersion: 2020,
sourceType: 'module',
},
ignorePatterns: ['*.config.js', 'config/*', '*.mjs', 'tests/*.js'],
ignorePatterns: ['*.config.js', 'config/*', '*.mjs', 'tests/*.js', 'client/*'],
plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'prettier'],
rules: {
'prettier/prettier': 'error',
Expand Down
6 changes: 6 additions & 0 deletions client/typescript.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"supportsES6": false,
"npmName": "@hirosystems/ordinals-api-client",
"npmVersion": "1.0.0",
"modelPropertyNaming": "original"
}
4 changes: 4 additions & 0 deletions client/typescript/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist
4 changes: 4 additions & 0 deletions client/typescript/.swagger-codegen-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.gitignore
package.json
package-lock.json
README.md
1 change: 1 addition & 0 deletions client/typescript/.swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.42
19 changes: 19 additions & 0 deletions client/typescript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## @hirosystems/ordinals-api-client

This is a client library for the [Ordinals API](https://github.com/hirosystems/ordinals-api).

### Installation

```
npm install @hirosystems/ordinals-api-client
```

### Example

```typescript
import { Configuration, InscriptionsApi } from "@hirosystems/ordinals-api-client";

const config = new Configuration();
const api = new InscriptionsApi(config);
const result = await api.getInscription("200000")
```
Loading

0 comments on commit 23e48f1

Please sign in to comment.