n-keen-query

    1.2.1 • Public • Published

    n-keen-query

    Extended keen-query for next

    npm install -g Financial-Times/n-keen-query

    Make sure you have KEEN_READ_KEY and KEEN_PROJECT_ID env vars set

    Warning - This isn't versioned yet (as it'd make developing beacon, keen-query and n-keen-query in parallel more difficult). The syntax is quite experimental and subject to change

    Extended API

    In addition to the shorthand query syntax of keen-query This module defines a few next specific things

    All queries exclude staff by default. To include them add ->raw() to your query string

    • ->subs() return data for subscribers only
    • ->anon() return data for anonymous users only

    PRs welcome for additional shorthands, though only for ones aimed at data in the new keen instance

    Note - for the time being they all work with the current keen instance. A new cleaned up keen & beacon is in the works with a different data structure, so eventually some of the aliases defined here won't work in the old keen

    Aliasing

    Aliases for keen-queries are defined in a spreadsheet

    Adding an alias here does a few things

    • adds it to the list returned by kq alias
    • means the query is runnable using kq alias aliasName
    • means (eventually) the query will be picked up by beacon v2

    Keywords

    none

    Install

    npm i n-keen-query

    DownloadsWeekly Downloads

    19

    Version

    1.2.1

    License

    ISC

    Last publish

    Collaborators

    • robgodfrey
    • hamza.samih
    • nikita.lohia
    • notlee
    • efinlay24
    • emmalewis
    • aendra
    • the-ft
    • rowanmanning
    • chee
    • alexwilson