UNPKG

1.21 kBMarkdownView Raw
1# fcp-client-js
2Fashion Content Platform - JavaScript SDK
3
4## Getting started
5
6### Install
7
8#### with NPM
9
10```
11npm install --save @fashioninsights-zalando/fcp-client
12```
13
14#### with Yarn
15
16```
17yarn add @fashioninsights-zalando/fcp-client
18```
19
20
21### Usage
22
23#### Content Insights Client
24
25```
26import { ContentInsightsApi } from 'fcp-client'
27...
28
29const client = new ContentInsightsApi({ host: 'http://fcp-host/', tenantID: 'MY_FCP_TENANT_ID' })
30...
31```
32
33#### Influencers Client
34
35```
36import { InfluencersClient } from 'fcp-client'
37...
38
39const client = new InfluencersClient({ host: 'http://fcp-host/', tenantID: 'MY_FCP_TENANT_ID' })
40...
41```
42
43## Development
44
452. Building
46 * Run `yarn` to get the project's dependencies
47 * Run `yarn run build` to produce minified version.
483. Development mode
49 * Having all the dependencies installed run `yarn run dev`. This command will generate an non-minified version and will run a watcher so you get the compilation on file change.
504. Running the tests
51 * Run `yarn run test`
52
53## Scripts
54
55* `yarn run build` - produces production version under the `lib` folder
56* `yarn run dev` - produces development version and runs a watcher
57* `yarn run test` - well ... it runs the tests :)