@plasma-platform/service-pages
v1.3.4
Published
SDK for working with service pages
Downloads
13
Readme
Full documentation
install:npm i @plasma-platform/service-pages -S
Short documentation
Table of Contents
- PagesService
- getPageByUrl
- getPagesIntersectionsList
- getTypeStatistics
- getStatisticsTypesIds
- getPropertySuggest
PagesService
Pages Micro Service API.
Parameters
url
string service url
getPageByUrl
returned information about the custom page by url
Parameters
pageUrl
string page url
Examples
(async () => {
const pageService = new CartsService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
})();
Returns Object Promise
getPagesIntersectionsList
returned information about intersections the custom page by url
Examples
(async () => {
const pageService = new PagesService('https://jsonplaceholder.typicode.com/', {
locale: 'en',
conditions: [
{
attribute: 'properties.types',
value: 'WordPress Themes',
},
],
intersections: [
{
attribute: [
'properties.features',
'properties.topics',
],
value: [
'admin-panel',
],
},
],
fields: 'custom_url',
}');
})();
Returns Object Promise
getTypeStatistics
returned statistics for type
Examples
(async () => {
const pageService = new PagesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
})();
Returns Object Promise
getStatisticsTypesIds
returned statistics types ids
Examples
(async () => {
const pageService = new PagesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
})();
Returns Object Promise
getPropertySuggest
returned statistics for type
Examples
(async () => {
const pageService = new PagesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
})();
Returns Object Promise