4.0.0 • Published 1 year ago
ventour-angular-client-core v4.0.0
Ventour Angular Client Core
Basic configuration example
Create configuration for module:
const configuration = {
host: 'https://dev.ventour.gvam.es',
museum_id: "756C59FE-1998-4A2A-A4FF-F9BCEF438105",
authentication: {
client_id: "4m3jdn9q2uwwgk0gkwgc80occocggc08sk0k4w4os8k8ccg40s",
client_secret: "2svot3j0qnk04wkc4gw4ssww00o4ccg08cw8oogks40cw8w444"
}
};
Import module:
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
VentourAngularClientCoreModule.forRoot(configuration)
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
API
VentourAngularClient
Methods
fetchAllAndPersist(): Observable<unknown>
: Fetch all and persist.getMuseumLanguages(): Observable<MuseumLanguage[]>
: Fetch & persist all languages from http server.getTours(): Observable<Tour[]>
: Fetch & persist all tours from http server.getSections(): Observable<Section[]>
: Fetch & persist all sections from http server.getItems(): Observable<Item[]>
: Fetch & persist all items from http server.getTrees(): Observable<Tree[]>
: Fetch & persist all trees from http server.getAwards(): Observable<Award[]>
: Fetch & persist all awards from http server.getMuseumLanguagesFromMemory(): Observable<MuseumLanguage[]>
: Get museum languages from local storage.getToursFromMemory(): Observable<Tour[]>
: Returns tour list from local storage.getTourFromMemory(id: string, fetchTrees: boolean = false): Observable<Tour|null>
: Get tour by id from local storage.getSectionsFromMemory(): Observable<Section[]>
: Returns all sections from local storage.getItemsFromMemory(): Observable<Item[]>
: Returns all items from local storage.getItemFromMemory(id: string): Observable<Item|null>
: Get item from local storage.getTourTree(tour: Tour): Observable<Tree[]>
: Returns all nested tree associated to tour.getSectionTree(section: Section): Observable<Tree[]>
: Returns all nested tree associated to section.getItemTree(item: Item): Observable<Tree|null>
: Returns tree if exists associated to item.getNextTree(tree: Tree): Observable<Tree|null>
: Returns all nested trees by parent tree.getTourItems(tour: Tour): Observable<Item[]>
: Returns a list with all items associated to tour.getTreeItem(tree: Tree): Observable<Item|null>
: Returns item associated to tree.clearStorage(): void
: Remove all data from local storage.findByKeyboardInput(keyboardInput: string): Observable<Item|null>
: Find item by keyboard field.findByKeyboardOnTour(tour: Tour, keyboardInput: string): Observable<Item|null>
: Find item in tour by keyboard field.iterateMediaFilesFromTour(handler: MediaFileIteratorHandler, tours: Tour[]): void
: Iterate all media files in tour.iterateMediaFilesFromItems(handler: MediaFileIteratorHandler, items: Item[]): void
: Iterate all media files in items list.getMediasUrls(): Observable<string[]>
: Fetch all absolute urls from tours and items.getAwardsFromMemory(): Observable<Award[]>
: Fetch all awards from local memory.getTreeFromMemory(id: string): Observable<Tree|null>
: Get a Tree from from local memory.getTreesFromMemory(): Observable<Tree[]>
: Fetch all trees from local memory.
Pipes
GetMainLanguage
Example:
<p>{{item.languages | GetMainLanguageProperty : 'es_ES' : 'title'}}</p>
this.pipe.transform<string>(item.languages, 'es_ES', 'title');
3.5.2
1 year ago
3.6.0
1 year ago
4.0.0
1 year ago
3.4.0
2 years ago
3.5.1
2 years ago
3.5.0
2 years ago
3.3.0
2 years ago
3.2.0
2 years ago
3.1.0
2 years ago
3.0.0
2 years ago
2.4.3
2 years ago
2.4.1
2 years ago
2.4.0
2 years ago
2.4.2
2 years ago
2.3.2
2 years ago
2.3.1
2 years ago
2.3.0
2 years ago
2.2.0
2 years ago
2.1.1
2 years ago
2.1.0
2 years ago
1.3.0
2 years ago
1.2.0
2 years ago
1.1.0
2 years ago
1.0.0
2 years ago
0.0.1
2 years ago