Core APIs Reference
In-depth documentation for the fundamental APIs that power the Eiseniiaiia framework.
๐ Core API Categories
Modular System API
Manage module initialization, configuration, and lifecycle events with the base framework API.
Interoperability API
Seamlessly integrate with external frameworks and legacy systems using standardized adapters.
Performance Tools API
Access real-time profiling, memory diagnostics, and optimization utilities.
Analytics API
Measure system performance, user behavior, and API usage patterns in real-time.
๐ API Reference
Module API
The foundation for creating modular components in Eiseniiaiia.
// Basic usage
const myModule = new Module({
name: 'my-custom-module',
version: '1.0.0',
dependencies: ['@eiseniiaiia/core@latest']
});
myModule.init().then(() => {
console.log('Module ready');
});
Parameters:
- name - module identifier
- version - semantic version
- dependencies - array of required packages
Methods
- init() Initializes the module and its dependencies
- destroy() Cleanly unloads the module
- on(event) Registers event listeners
๐ Interoperability API
Bridge between Eiseniiaiia modules and external frameworks/legacy systems.
import { Adaptors } from '@eiseniiaiia/core';
// Create Express integration
const expressBridge = Adaptors.create({
framework: 'express',
version: '4.18.2'
});
app.use(expressBridge.middleware());
Supported Adaptors:
Key Features
- Automatic dependency mapping
- Version compatibility checking
- Built-in middleware patterns
๐ API Usage Examples
Example: Performance Monitoring
Measure API performance with the profiling tools API.
import { Profiler } from '@eiseniiaiia/performance';
const metrics = Profiler.start();
// Code to profile
for (let i = 0; i < 10000; i++) {
// complex operation
}
const results = Profiler.stop();
console.log('Execution time:', results.duration);
Expected Output
{
duration: 8.32ms,
peakMemory: '12.7MB',
callCount: 9823
}
๐ฆ API Versioning
Semver Compatibility
Current Versions
Deprecation Policy
- โข Major versions get support for 18 months
- โข Minor versions are supported for 6 months
- โข Patch updates for security fixes only
Upgrading Notes
- โข Automatic migration tool available
- โข Migration guides in docs
- โข Semantic versioning enforced
๐ Need Help?
For questions about API implementation or best practices, check out our documentation portals or reach out via GitHub.