jspaste 0.0.1 copy "jspaste: ^0.0.1" to clipboard
jspaste: ^0.0.1 copied to clipboard

A library to interact with the JSPaste API.

example/jspaste_example.dart

import 'package:jspaste/jspaste.dart';

void main() async {
  // Create a new JSPaste client instance
  JSPasteClient client = JSPasteClient(secret: 'your_secret_key_here');

  try {
    // Create a new document
    Document createdDocument = await client.createDocument(
        'Hello, this is a test document!', 'document_password');
    print('Document created with ID: ${createdDocument.id}');

    // Get the document by its ID
    Document retrievedDocument =
        await client.getDocumentById(createdDocument.id!, 'document_password');
    print('Retrieved document: ${retrievedDocument.text}');

    // Update the document
    await client.updateDocument(
        createdDocument.id!, 'Updated content for the document.');
    print('Document updated successfully.');

    // Delete the document
    await client.deleteDocument(createdDocument.id!);
    print('Document deleted successfully.');
  } catch (e) {
    print('Error: $e');
  }
}
3
likes
0
points
40
downloads

Publisher

verified publishernulkode.dev

Weekly Downloads

A library to interact with the JSPaste API.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on jspaste