1.0.0 • Published 7 years ago
octo-npm v1.0.0
WHAT IS IT
octo-npm is a very basic and simple npm package that will help you integrating Octopinion in your web side. Octopinon is a tool designed to analyse reviews in your web and retrieve very useful information from them.
HOW TO USE
- Install the package.
- Genrate the source file from product key.
- Use generated js file in the client.
Install the package
npm install --save octo-npm
// package.json
{
"dependencies": {
"octo-npm": "^1.0.5"
}
}
Import it in the server.
- Using ES6
import Octo from 'octo-npm';
- Using ES5
var octo = require("octo-npm");
Generate source file
That will generate the source file used in the client. Place it within your project.
new Octo('key','username', 'path');
- @param key -> Find the key in your Octo user dashboard.
- @param username -> Your username.
- @param path -> a relative path. For example './' if you want to generate the js client file in the same directory where you are executing the function.
Request generated js client file.
Have a look into test/test.html in order see an example.
CHANGE PARAMETERS
- userKey -> Key identifying the logged user.
- pageSize -> Number of reviews per page.
- insertLastReviews -> If last reviews have to be displayed.
- callback -> Callback function to be executed when a new review has been analised.
Note: Have a look at the examples in test/test.html
LIMITATIONS
- Paginating only with next, previous, last and first buttons.
- Using icons from font-awesome.
- CSS classes are not changeable.