2.3.0 • Published 1 year ago

@urbit/api v2.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Urbit API in JavaScript

This package simplifies the process of working with Urbit's APIs into fluent, typed functions organized by app. Pairs well with @urbit/http-api. Compare:

Without:

import UrbitInterface from '@urbit/http-api';
const api: UrbitInterface = useApi();
api.poke({
  app: 'settings-store',
  mark: 'settings-event',
  json: {
    'put-entry': {
      'bucket-key': bucket,
      'entry-key': key,
      'value': value
    }
  }
});

With:

import UrbitInterface from '@urbit/http-api';
import { settings } from '@urbit/api';
const api: UrbitInterface = useApi();
api.poke(settings.putEntry(bucket, key, value));

You may import single functions

import { putEntry } from '@urbit/api';

or whole apps:

import { settings } from '@urbit/api';

This package also provides types and utilities for working with Urbit's internal data structures, such as Nouns, Das, Tas, and so forth.

This package was originally developed as part of Tlon's Landscape client and therefore the best reference material exists there.

2.3.0

1 year ago

2.2.0

1 year ago

2.1.1

2 years ago

2.1.0-dev.4

3 years ago

2.1.0-dev.3

3 years ago

2.1.0-dev.5

3 years ago

2.1.0-dev.2

3 years ago

2.1.0-dev.1

3 years ago

2.1.0

2 years ago

2.1.0-dev

3 years ago

2.0.0

3 years ago

1.4.0

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago