0.0.59 • Published 5 years ago

lytics-js v0.0.59

Weekly downloads
67
License
ISC
Repository
github
Last release
5 years ago

Installation

#global package installation (recommended if you are new to npm packages)
npm install lytics-js -g

#local package installation
npm install lytics-js 

Usage

JavaScript

You can use this package in order to write applications that use the Lytics API.

var lytics = require('lytics-js');
var client = lytics.getClient('[apikey]');
//
//get an array of account objects
var accounts = await client.getAccounts();
//
//test a query function
var is_true = await client.testFunction('tobool', ['1']);
var is_false = await client.testFunction('tobool', ['f']);
var is_undefined = await client.testFunction('email', ['something that isn\'t an email']);
var is_email = await client.testFunction('email', ['test@email.com']);

Command-line interface (CLI)

This package includes a command-line interface (CLI) for Lytics. The CLI is available as an executable included in the package. You can run the CLI by installing the package locally or globally.

Display help

#local package
$(npm bin)/lytics-js help

#global package
lytics-js help

Lytics watch

#to use the Lytics API key set in the environment variable LIOKEY
lytics-js watch .

#to pass the Lytics API key directly
lytics-js -k [apikey] watch .

Test query function

#to use the Lytics API key set in the environment variable LIOKEY
lytics-js function contains "something really interesting" "really"

#to pass the Lytics API key directly
lytics-js -k [apikey] function tobool 1

#passing multiple parameters
lytics-js function contains "something really interesting" "really"

#passing no parameters
lytics-js function now

User field whitelisting

#list user fields currently whitelisted
lytics-js whitelist -a [Lytics account ID] list

#add a field to the whitelist
lytics-js whitelist -a [Lytics account ID] add email

#remove a field from the whitelist
lytics-js whitelist -a [Lytics account ID] remove email
0.0.59

5 years ago

0.0.58

5 years ago

0.0.57

5 years ago

0.0.56

5 years ago

0.0.55

5 years ago

0.0.54

5 years ago

0.0.53

5 years ago

0.0.52

5 years ago

0.0.51

5 years ago

0.0.50

5 years ago

0.0.49

5 years ago

0.0.48

6 years ago

0.0.47

6 years ago

0.0.46

6 years ago

0.0.45

6 years ago

0.0.44

6 years ago

0.0.43

6 years ago

0.0.42

6 years ago

0.0.41

6 years ago

0.0.40

6 years ago

0.0.39

6 years ago

0.0.38

6 years ago

0.0.37

6 years ago

0.0.36

6 years ago

0.0.35

6 years ago

0.0.34

6 years ago

0.0.33

6 years ago

0.0.32

6 years ago

0.0.31

6 years ago

0.0.30

6 years ago

0.0.29

6 years ago

0.0.28

6 years ago

0.0.27

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago