https://github.com/textileio/dart-textile
Dart library to build apps on Textile
https://github.com/textileio/dart-textile
Last synced: about 1 year ago
JSON representation
Dart library to build apps on Textile
- Host: GitHub
- URL: https://github.com/textileio/dart-textile
- Owner: textileio
- License: mit
- Created: 2020-02-05T01:06:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-11T18:53:52.000Z (about 6 years ago)
- Last Synced: 2023-08-20T23:23:58.359Z (almost 3 years ago)
- Language: Dart
- Size: 45.9 KB
- Stars: 10
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dart-textile
> Warning: The dart-textile library is temporarily deprecated not currently up-to-date with the [Textile Hub](https://docs.textile.io/hub/introduction/) and so will not work. If you are waiting for Dart support, please [see here](https://github.com/textileio/dart-textile/issues/5).
[](https://textile.io)
[](https://slack.textile.io)
[](./LICENSE)
[](https://pub.dartlang.org/packages/textile)
[](https://github.com/textileio/go-threads)
[](https://github.com/textileio/dart-textile/actions?query=branch%3Amaster)
> Textile's Dart client for interacting with remote Threads
Join us on our [public Slack channel](https://slack.textile.io/) for news, discussions, and status updates. [Check out our blog](https://medium.com/textileio) for the latest posts and announcements.
## Table of Contents
- [Getting Started](#getting_started)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)
## Getting Started
You can use this library to access and use Textile's hosted APIs.
### Examples
Examples require the use of the [threads-client](https://github.com/textileio/dart-threads-client/).
#### Run Threads on Textile APIs
```dart
import 'package:textile/textile.dart' as textile;
import 'package:threads_client/threads_client.dart' as threads;
const APP_TOKEN = '';
const DEVICE_ID = '';
void main(List 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
```dart
import 'package:textile/textile.dart' as textile;
import 'package:threads_client/threads_client.dart' as threads;
const APP_TOKEN = '';
const DEVICE_ID = '';
/*
* Run your app against a local Threads daemon for easy testing and debugging.
*/
void main(List 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
```dart
import 'package:textile/textile.dart' as textile;
import 'package:threads_client/threads_client.dart' as threads;
const APP_TOKEN = '';
const DEVICE_ID = '';
void main(List 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](https://slack.textile.io) on Slack.
- **Open issues**, [file issues](https://github.com/textileio/dart-textile/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](./CONTRIBUTING.md) and our [contributor covenant code of conduct](./CODE_OF_CONDUCT.md).
## Changelog
[Changelog is published to Releases.](https://github.com/textileio/dart-textile/releases)
## License
[MIT](LICENSE)