npm package: @plasma-platform/service-pages
Description: SDK for working with service pages
Author: Sergey Mirza
Latest version: 1.3.4

![version](https://badgen.net/npm/v/@plasma-platform/service-pages)
![nextVersion](https://badgen.net/npm/v/@plasma-platform/service-pages/next)
![downloads](https://badgen.net/npm/dt/@plasma-platform/service-pages)
![license](https://badgen.net/npm/license/@plasma-platform/service-pages)
![dependency](https://badgen.net/npm/dependents/@plasma-platform/service-pages)  

* * *

[Full documentation](https://templatemonster.gitlab.io/PlasmaPlatform/Frontend/plasma-platform/?path=/story/plasma-platform-sdk--service-pages)  
install:  
`npm i @plasma-platform/service-pages -S`  

# Short documentation

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [PagesService](#pagesservice)
    -   [Parameters](#parameters)
-   [getPageByUrl](#getpagebyurl)
    -   [Parameters](#parameters-1)
    -   [Examples](#examples)
-   [getPagesIntersectionsList](#getpagesintersectionslist)
    -   [Examples](#examples-1)
-   [getTypeStatistics](#gettypestatistics)
    -   [Examples](#examples-2)
-   [getStatisticsTypesIds](#getstatisticstypesids)
    -   [Examples](#examples-3)
-   [getPropertySuggest](#getpropertysuggest)
    -   [Examples](#examples-4)

## PagesService

-   **See: <https://jsonplaceholder.typicode.com/>**

Pages Micro Service API.

### Parameters

-   `url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** service url

## getPageByUrl

returned information about the custom page by url

### Parameters

-   `pageUrl` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** page url

### Examples

```javascript
(async () => {
  const pageService = new CartsService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
})();
```

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Promise

## getPagesIntersectionsList

returned information about intersections the custom page by url

### Examples

```javascript
(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](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Promise

## getTypeStatistics

returned statistics for type

### Examples

```javascript
(async () => {
  const pageService = new PagesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
})();
```

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Promise

## getStatisticsTypesIds

returned statistics types ids

### Examples

```javascript
(async () => {
  const pageService = new PagesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
})();
```

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Promise

## getPropertySuggest

returned statistics for type

### Examples

```javascript
(async () => {
  const pageService = new PagesService('https://jsonplaceholder.typicode.com/', 'dsugsahfdkljhafljkdfhajkldshfad');
})();
```

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Promise