ngx-drupal7-services
Version:
# Angular 2+/Ionic 2+ Drupal 7 Services #### Typescript angular module for [Drupal Services 3.x](https://www.drupal.org/project/services)
50 lines (49 loc) • 1.55 kB
TypeScript
import { Observable } from 'rxjs';
import { Settings, SystemConnection } from '../models';
/**
* DrupalConstants singleton design pattern of the required settings and user connection.
*/
export declare class DrupalConstants {
/**
* Singleton instance.
* didn't understand it ? Oh come on!.
*/
private static instance;
/**
* private variables for set and get.
*/
private settings;
private connection;
constructor();
/**
* handle offline error messages
* @param err (optional) the error of the http request
*/
handleOffline: (err?: any) => Observable<any>;
static get Instance(): DrupalConstants;
/**
* Handeling the case when user didn't implement the back-end settings and return the settings instance
*/
static get Settings(): Settings;
/**
* Set the settings instanse on application init.
* you can also do that at the runtime, Thanks to Singleton design pattern <3 !
*/
static set Settings(newSettings: Settings);
/**
* the full backend url for current user settings
*/
static get backEndUrl(): string;
/**
* Application back-end rest api url.
*/
static get restUrl(): string;
/**
* Updating connection instanse after login or rightaway after openning the connection
*/
static set Connection(newConnection: SystemConnection);
/**
* get the connection instance
*/
static get Connection(): SystemConnection;
}