at_lookup 3.7.0-rc1 copy "at_lookup: ^3.7.0-rc1" to clipboard
at_lookup: ^3.7.0-rc1 copied to clipboard

A Dart library that contains the core commands that can be used with a secondary server (scan, update, lookup, llookup, plookup, etc.)

example/README.md

The Atsign FoundationThe Atsign Foundation

Now for a little internet optimism #

at_lookup_example library #

The atlookup package is an interface between the Client SDK and the cloud secondary.

Give it a try #

This package includes a sample code in the example directory for usage of the at_lookup library.

Usage #

Initializing the atLookup Instance

final atLookUp = AtLookUp.withSecureSocket(
  atSign: '@alice',
  rootDomain: AtRootDomain.atsignDomain,
  transport: secureSocketTransport(SecureSocketConfig()),
  // at_auth builds this from whatever credential you hold. Pass null for a
  // connection that never authenticates.
  authenticator: authenticatorFor(keysIo, '@alice'),
);

Update the key

//Build update verb builder
var updateVerbBuilder = UpdateVerbBuilder()
  ..atKey = 'phone'
  ..sharedBy = '@alice'
  ..sharedWith = '@bob'
  ..value = '+1 889 886 7879';

// Sends update command to the secondary server
var updateResult = atLookupImpl.executeVerb(updateVerbBuilder);

Get the value of the key

// Builds lookup key builder
var lookupVerbBuilder = LookupVerbBuilder()
  ..atKey = 'phone'
  ..sharedBy = '@bob'
  ..auth = true;
// Sends lookup command to secondary server
var lookupResult = atLookupImpl.executeVerb(lookupVerbBuilder);

Retrieve the keys from the secondary server

// Builds scan verb builder
var scanVerbBuilder = ScanVerbBuilder();
var scanResult = atLookupImpl.executeVerb(scanVerbBuilder);

Delete the key from secondary server

//Builds delete verb builder
var deleteVerbBuilder = DeleteVerbBuilder()
    ..sharedWith = '@bob'
    ..atKey = 'phone'
    ..sharedBy = '@alice';
// Sends delete key to secondary server  
var deleteResult = atLookupImpl.executeVerb(deleteVerbBuilder);
10
likes
160
points
21.1k
downloads

Documentation

Documentation
API reference

Publisher

verified publisheratsign.org

Weekly Downloads

A Dart library that contains the core commands that can be used with a secondary server (scan, update, lookup, llookup, plookup, etc.)

Homepage
Repository (GitHub)
View/report issues
Contributing

License

BSD-3-Clause (license)

Dependencies

at_chops, at_commons, at_utils, meta, mutex

More

Packages that depend on at_lookup