nsid 1.0.2 copy "nsid: ^1.0.2" to clipboard
nsid: ^1.0.2 copied to clipboard

discontinuedreplaced by: at_primitives

Core library for parsing NSIDs in the AT Protocol standard.

nsid

Core library for parsing NSIDs in the AT Protocol standard 🦋

1. Guide 🌎 #

This library provides the easiest way to use NSID supported by AT Protocol in Dart and Flutter apps.

1.1. Getting Started ⚡ #

1.1.1. Install Library #

With Dart:

 dart pub add nsid

Or With Flutter:

 flutter pub add nsid

1.1.2. Import #

import 'package:nsid/nsid.dart';

1.1.3. Implementation #

import 'package:nsid/nsid.dart';

void main(List<String> args) {
  final id1 = NSID.parse('com.example.foo');
  id1.authority; // => 'example.com'
  id1.name; // => 'foo'
  id1.toString(); // => 'com.example.foo'

  final id2 = NSID.create('example.com', 'foo');
  id2.authority; // => 'example.com'
  id2.name; // => 'foo'
  id2.toString(); // => 'com.example.foo'

  final id3 = NSID.create('example.com', '*');
  id3.authority; // => 'example.com'
  id3.name; // => '*'
  id3.toString(); // => 'com.example.*'
}
1
likes
150
points
3.1k
downloads

Publisher

verified publisheratprotodart.com

Weekly Downloads

Core library for parsing NSIDs in the AT Protocol standard.

Topics

#atproto #bluesky #nsid

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on nsid