Skip to content

chris-devel0per/FlutterBookstackApiExample

Repository files navigation

BookStackAPI Flutter/Dart Script Readme

This Flutter/Dart script demonstrates the usage of the BookStackAPI library to interact with a BookStack instance. The script showcases various functions available in the BookStackAPI library, allowing you to perform operations such as fetching books, chapters, and pages, creating new content, updating existing content, and more.

Flutter Dart BookStackAPI

First of all:

Check out Bookstack: LINK TO BOOKSTACK

Example

Image Description
example of the UI This image provides an overview of the demo's appearance. Within the Appbar, a prominent button resembling a burger icon is present.
Upon clicking this button, a dropdown menu emerges, showcasing a comprehensive array of Bookstack API functions.
At the lower section of the image, the bookstack response is visibly displayed.
Upon selecting a particular function from the Bookstack API list, the associated command is executed promptly.
Subsequently, the response generated by the executed command is presented within the designated response area.
It's important to note that certain buttons necessitate the prior input of an 'id.' This id can be located within the respective function.
Modify the id accordingly for optimal functionality.

Getting Started

  1. Clone this repository to your local machine:

    git clone https://github.com/chris-devel0per/FlutterBookstackApiExample.git
    cd FlutterBookstackApiExample
  2. Install Flutter and Dart if you haven't already. Follow the official installation guide for your platform.

  3. Install dependencies:

    flutter pub get
  4. Configure the BookStackAPI settings:

    Open the lib/controller/server_info.dart file and provide your BookStack instance's base URL, API token, and other configuration details.

  5. Run the script:

    flutter run

Features

Authentication

The script demonstrates how to authenticate with the BookStack API using your API token and make authenticated requests.

Fetching Books, Chapters, and Pages

You can use the library to fetch a list of books, chapters within a book, and pages within a chapter. The script showcases how to retrieve this hierarchical content structure.

Creating Content

Learn how to create new books, chapters, and pages using the BookStackAPI library. The script includes examples of creating various types of content.

Updating Content

See how to update existing content such as book titles, chapter names, and page content.

Deleting Content

The script demonstrates how to delete books, chapters, and pages. Be cautious when using this functionality, as it permanently removes content.

Search

Learn how to perform search queries using the BookStackAPI library. The script showcases searching for books, chapters, and pages based on keywords.

Attachments

Learn how to interact with the Attachments

Image-Gallery

Learn how to interact with the Image-Gallery

USER & ROLES

Learn how to manage users and Roles

ATTENTION

These methods are !!!NOT!!! supported:

Recycle-Bin>restore

Recycle-Bin>destroy

Content-permissions>update

Documentation

For more detailed information about the available functions and classes in the BookStackAPI library, refer to the official documentation provided with the library. You can find it here.

Contributions

Contributions to this script and the associated documentation are welcome. If you find any bugs or have suggestions for improvement, please open an issue or submit a pull request on the GitHub repository.

License

This script is released under the MIT License.


Happy coding! If you have any questions or need assistance, feel free to reach out to the author at Discord (skiddybison5924).

About

This Flutter project demonstrates how to use the Bookstack API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published