common-core-api

0.0.97 • Public • Published

common-core-api

Implementation of http://commonstandardsproject.com api for Node.js/Npm

Git for common-standards-project: https://github.com/commoncurriculum/common-standards-project

Uses https://www.algolia.com for search as instructed in http://commonstandardsproject.com docs

algoliasearch-client-js -> https://github.com/algolia/algoliasearch-client-js

Api

const commonCoreApi = require( "common-core-api" )

Connect

const commonCore = commonCoreApi( "api-key" , "algolia-id" , "algolia-key" )

Use

const commonCore = require( "common-core-api" )( "api-key" , "algolia-id" , "algolia-key" )
Get jurisdictions commonCore.jurisdictions()
Get jurisdiction commonCore.jurisdictions( "jurisdiction.id" ) commonCore.j( "jurisdiction.id" )
Get standard_set commonCore.standard_sets( "standard_set.id" ) commonCore.ss( "standard_set.id" )
Search commonCore.search( "query" ) commonCore.s( "query" )

commonCore.get('url')

Url {
    protocol: 'http:',
    slashes: true,
    auth: null,
    host: 'commonstandardsproject.com',
    port: null,
    hostname: 'commonstandardsproject.com',
    hash: null,
    search: null,
    query: null,
    pathname: '/api/v1',
    path: '/api/v1',
    href: 'http://commonstandardsproject.com/api/v1' 
}

commonCore.get('schemas')
{ 
    jurs: 
       { event: 'jurs',
         name: 'jurisdictions',
         description: 'Doc sample of request result',
         doc: [Getter] },
      sets: 
       { event: 'sets',
         name: 'standard-sets',
         description: 'Doc sample of request result',
         doc: [Getter] },
      search: 
       { event: 'search',
         name: 'algolia-search',
         description: 'Search result sample from algolia-search',
         doc: [Getter] } 
}

Editing

Currently no methods for interfacing with editing

Package Sidebar

Install

npm i common-core-api

Weekly Downloads

10

Version

0.0.97

License

ISC

Last publish

Collaborators

  • fcampas