@fluentity/core
    Preparing search index...

    Class Fluentity

    Main Fluentity class that manages API communication. Implements the singleton pattern to ensure a single instance is used throughout the application. Handles adapter management and provides a central point for API communication.

    // Initialize with custom adapter
    Fluentity.initialize({
    adapter: new RestAdapter()
    });

    // Get instance
    const fluentity = Fluentity.getInstance();
    Index

    Accessors

    Methods

    Accessors

    Methods

    • Gets the Fluentity singleton instance.

      Returns Fluentity

      The Fluentity instance

      If Fluentity has not been initialized

      const fluentity = Fluentity.getInstance();
      
    • Initializes the Fluentity singleton instance. Must be called before using any other Fluentity functionality.

      Parameters

      Returns Fluentity

      The initialized Fluentity instance

      If Fluentity has already been initialized

      Fluentity.initialize({
      adapter: new RestAdapter({
      baseURL: 'https://api.example.com'
      })
      });