new fluro(options)
- Source:
Creates a new FluroCore instance including all of the default sub modules
Example
//Import the Fluro package
import Fluro from 'fluro';
//Create a new Fluro instance
var fluro = new Fluro();
//Request the current user session endpoint from the Fluro API
fluro.api.get('/session').then(function(res) {
console.log('User session is ', res.data);
})
.catch(function(err) {
console.log('There was an error', err);
});
//Use the FluroAsset package to generate an image url
var link = fluro.asset.imageUrl('5ca3d64dd2bb085eb9d450db', 1920, 1080)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Members
(inner) access :FluroAccess
- Source:
A helper service for understanding a user's access permissions
Type:
- FluroAccess
(inner) api :FluroAPI
- Source:
The default service for interacting with
the Fluro REST API, it's a wrapper around the axios library
that works in conjunction with the other Fluro modules
Type:
- FluroAPI
(inner) asset :FluroAsset
- Source:
The default service for managing, rendering and handling files and media from Fluro.
It contains helper functions for managing connecting to image, audio, asset and video api endpoints.
Type:
- FluroAsset
(inner) auth :FluroAuth
- Source:
The default service for managing authentication
handles automatic refreshing of access tokens, and provides login, logout
and other user/application specific functionality
Type:
- FluroAuth
(inner) cache :FluroCache
- Source:
Provides a cache service, used for creating, clearing
and storing API requests and other information in memory
Type:
- FluroCache
(inner) components :FluroComponents
- Source:
Provides helper functions for working with Fluro Components
Type:
- FluroComponents
(inner) content :FluroContent
- Source:
A helper service for CRUD operations that wraps around the fluro.api service
Type:
- FluroContent
(inner) date :FluroDate
- Source:
Provides date functions, filters and utilities
for working with dates and timezones
Type:
- FluroDate
(inner) device :FluroDevice
- Source:
Provides helper functions for understanding the users device
Type:
- FluroDevice
(inner) stats :FluroStats
- Source:
The default service for handling a user's 'stats' eg. (likes, views, favorites, downvotes etc...)
This service creates and syncs user's stats when they 'stat' items from Fluro.
Type:
- FluroStats
(inner) types :FluroTypes
- Source:
A helper service for retrieving, translating and rendering content types and definitions
defined within Fluro.
Type:
- FluroTypes
(inner) utils :FluroUtils
- Source:
Provides helper functions for working
with Fluro data
Type:
- FluroUtils
(inner) video :FluroVideo
- Source:
Provides helper functions for working
with Fluro Video data
Type:
- FluroVideo