Skip to content

Dart library to build apps on Textile

License

Notifications You must be signed in to change notification settings

watano/dart-textile

 
 

Repository files navigation

dart-textile

Warning: The dart-textile library is temporarily deprecated not currently up-to-date with the Textile Hub and so will not work. If you are waiting for Dart support, please see here.

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

Textile's Dart client for interacting with remote Threads

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

Getting Started

You can use this library to access and use Textile's hosted APIs.

Examples

Examples require the use of the threads-client.

Run Threads on Textile APIs

import 'package:textile/textile.dart' as textile;
import 'package:threads_client/threads_client.dart' as threads;

const APP_TOKEN = '<app token>';
const DEVICE_ID = '<uuid>';

void main(List<String> args) async {
  final config = textile.ThreadsConfig(APP_TOKEN, DEVICE_ID);
  final client = threads.Client(config: config);
  final store = await client.newStore();
  print('New store $store');
}

Run Threads in Debug mode with local Threads daemon

import 'package:textile/textile.dart' as textile;
import 'package:threads_client/threads_client.dart' as threads;

const APP_TOKEN = '<app token>';
const DEVICE_ID = '<uuid>';

/*
 * Run your app against a local Threads daemon for easy testing and debugging.
*/
void main(List<String> args) async {
  final config = textile.ThreadsConfig(APP_TOKEN, DEVICE_ID, dev: true);
  final client = threads.Client(config: config);
  final store = await client.newStore();
  print('New store $store');
}

Run Threads on Textile APIs

import 'package:textile/textile.dart' as textile;
import 'package:threads_client/threads_client.dart' as threads;

const APP_TOKEN = '<app token>';
const DEVICE_ID = '<uuid>';

void main(List<String> args) async {
  final config = textile.ThreadsConfig(APP_TOKEN, DEVICE_ID);
  final client = threads.Client(config: config);
  final store = await client.newStore();
  print('New store $store');
}

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

About

Dart library to build apps on Textile

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 100.0%