npm

@textile/textile
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

js-textile

Made by Textile Chat on Slack Threads version GitHub license Build status

JS lib for interacting with Textile APIs

Go to the docs for more about Textile.

Join us on our public Slack channel for news, discussions, and status updates. Check out our blog for the latest posts and announcements.

Table of Contents

Install

npm install @textile/textile

Usage

@textile/textile provides access to Textile APIs in apps based on a Project Token. For details on getting an app token, see textileio/textile or join the Textile Slack.

Threads APIs

Textile provides remote threads APIs your app can use.

  • token: a project token from your textile project
  • deviceId: a unique ID (uuid) for this user in your app
import {API} from '@textile/textile'
import {Client} from '@textile/threads-client'

const api = new API({
    token: '<project token>',
    deviceId: '<user id>'
})
await api.start()

const client = new Client(api.threadsConfig)
const newStore = client.newStore()

Developing threads with local deamon

Requires you run the Threads daemon (threadsd) on localhost. See instructions here.

import {API} from '@textile/textile'
import {Client} from '@textile/threads-client'

const api = new API({
    token: '<project token>',
    deviceId: '<user id>',
    dev: true
})
await api.start()

const client = new Client(api.threadsConfig)
const newStore = client.newStore()

Contributing

This project is a work in progress. As such, there's a few things you can do right now to help out:

  • Ask questions! We'll try to help. Be sure to drop a note (on the above issue) if there is anything you'd like to work on and we'll update the issue to let others know. Also get in touch on Slack.
  • Open issues, file issues, submit pull requests!
  • Perform code reviews. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
  • Take a look at the code. Contributions here that would be most helpful are top-level comments about how it should look based on your understanding. Again, the more eyes the better.
  • Add tests. There can never be enough tests.

Before you get started, be sure to read our contributors guide and our contributor covenant code of conduct.

Changelog

Changelog is published to Releases.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @textile/textile

Weekly Downloads

0

Version

0.3.1

License

MIT

Unpacked Size

3.83 MB

Total Files

23

Last publish

Collaborators

  • joewagner
  • awmuncy
  • sanderpick
  • textileio
  • andrewxhill
  • carsonfarmer
  • asutula