{"id":22165606,"url":"https://github.com/textileio/dart-threads-client","last_synced_at":"2025-07-26T11:32:11.333Z","repository":{"id":56841245,"uuid":"230000957","full_name":"textileio/dart-threads-client","owner":"textileio","description":"Threads client for Dart","archived":false,"fork":false,"pushed_at":"2020-05-19T15:22:07.000Z","size":375,"stargazers_count":13,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-08-20T23:24:02.041Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/textileio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-24T20:36:00.000Z","updated_at":"2020-12-23T08:54:47.000Z","dependencies_parsed_at":"2022-08-29T12:50:40.413Z","dependency_job_id":null,"html_url":"https://github.com/textileio/dart-threads-client","commit_stats":null,"previous_names":[],"tags_count":12,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textileio%2Fdart-threads-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textileio%2Fdart-threads-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textileio%2Fdart-threads-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textileio%2Fdart-threads-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/textileio","download_url":"https://codeload.github.com/textileio/dart-threads-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227673973,"owners_count":17802303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T05:15:44.002Z","updated_at":"2024-12-02T05:15:44.905Z","avatar_url":"https://github.com/textileio.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dart-threads-client\n\n\u003e Warning: The dart-threads-client library is temporarily deprecated as remote DB support 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).\n\n[![Made by Textile](https://img.shields.io/badge/made%20by-Textile-informational.svg?style=popout-square)](https://textile.io)\n[![Chat on Slack](https://img.shields.io/badge/slack-slack.textile.io-informational.svg?style=popout-square)](https://slack.textile.io)\n[![GitHub license](https://img.shields.io/github/license/textileio/dart-threads-client.svg?style=popout-square)](./LICENSE)\n[![Dart CI](https://github.com/textileio/dart-threads-client/workflows/Dart%20CI/badge.svg?style=popout-square\u0026branch=master)](https://github.com/textileio/dart-threads-client/actions?query=workflow%3A%22Dart+CI%22)\n[![Pub](https://img.shields.io/pub/v/threads_client.svg?style=popout-square)](https://pub.dartlang.org/packages/threads_client)\n[![Threads version](https://img.shields.io/badge/dynamic/yaml?style=popout-square\u0026color=3527ff\u0026label=go-threads\u0026prefix=v\u0026query=packages.threads_client_grpc.version\u0026url=https%3A%2F%2Fraw.githubusercontent.com%2Ftextileio%2Fdart-threads-client%2Fmaster%2Fpubspec.lock)](https://github.com/textileio/go-threads)\n[![Build status](https://img.shields.io/github/workflow/status/textileio/dart-threads-client/test/master.svg?style=popout-square)](https://github.com/textileio/dart-threads-client/actions?query=branch%3Amaster)\n\n\u003e Textile's Dart client for interacting with remote Threads\n\nJoin 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.\n\n## Table of Contents\n\n-   [Getting Started](#getting_started)\n-   [Usage](#Usage)\n-   [Development](#development)\n-   [Contributing](#contributing)\n-   [Changelog](#changelog)\n-   [License](#license)\n\n## Getting Started\n\nIn the `pubspec.yaml` of your project, add the following dependency:\n\n```\ndependencies:\n  ...\n  threads_client: \"^0.x.x\"\n```\n\n### Connect to a Threads Daemon\n\nYou can use Textile's hosted daemons or run your own.\n\n##### Use hosted Threads\n\n[Textile Threads](https://github.com/textileio/dart-textile).\n\n##### Run your own daemon\n\nYou need to run a threads daemon available to the client.\n\n```sh\ngit clone git@github.com:textileio/go-threads.git\ncd go-threads\ngo run threadsd/main.go -debug\n```\n\n## Usage\n\n[Read the Complete API Documentation](https://textileio.github.io/dart-threads-client/threads_client/threads_client-library.html).\n\n### Create a DB\n\n```dart\nimport 'package:threads_client/threads_client.dart' as threads;\n\nvoid main(List\u003cString\u003e args) async {\n  final client = threads.Client();\n  final dbId = 'bafk7ayo2xuuafgx6ubbcn2lro3s7oixgujdda6shv4';\n  final creds = threads.Creds.fromStrings(dbId);\n  await client.newDB(creds);\n}\n```\n\n### Run Threads using hosted Textile API\n\n```dart\nimport 'package:textile/textile.dart' as textile;\nimport 'package:threads_client/threads_client.dart' as threads;\n\nconst APP_TOKEN = '\u003capp token\u003e';\nconst DEVICE_ID = '\u003cuuid\u003e';\n\nvoid main(List\u003cString\u003e args) async {\n  final config = textile.ThreadsConfig(APP_TOKEN, DEVICE_ID);\n  final client = threads.Client(config: config);\n  final dbId = 'bafk7ayo2xuuafgx6ubbcn2lro3s7oixgujdda6shv4';\n  final creds = threads.Creds.fromStrings(dbId);\n  await client.newDB(creds);\n}\n```\n\n### Further examples\n\nYou can find a good overview of Client methods in the test suite.\n\n[Threads Client Tests](https://github.com/textileio/dart-threads-client/blob/master/test/threads_client_test.dart#L53)\n\n### Add custom metadata to requests\n\nFor example, add a custom auth token to the header of each request.\n\n```dart\n    final config = ThreadsConfig(\n      host: '127.0.0.1',\n      port: 6006,\n      callOptionsMetaData: {\n        'authorization': 'Bearer 3f2950d0-5522-4425-829f-75894e233442'\n      }\n    );\n    // Create a new threads client\n    client = Client(config);\n```\n\n## Development\n\n### Install\n\nRun the daemon, as above. Next, install and run the Dart `threads_client`:\n\n```sh\ngit clone git@github.com:textileio/dart-threads-client.git\ncd dart-threads-client\npub get\n```\n\n### Run tests\n\n```sh\ndart test/threads_client_test.dart\n```\n\n### Run example\n\n```sh\ndart example/helloworld.dart\n```\n\n## Contributing\n\nThis project is a work in progress. As such, there's a few things you can do right now to help out:\n\n-   **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.\n-   **Open issues**, [file issues](https://github.com/textileio/dart-threads-client/issues), submit pull requests!\n-   **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.\n-   **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.\n-   **Add tests**. There can never be enough tests.\n\nBefore you get started, be sure to read our [contributors guide](./CONTRIBUTING.md) and our [contributor covenant code of conduct](./CODE_OF_CONDUCT.md).\n\n## Changelog\n\n[Changelog is published to Releases.](https://github.com/textileio/js-threads-client/releases)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextileio%2Fdart-threads-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftextileio%2Fdart-threads-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextileio%2Fdart-threads-client/lists"}