common-core-api
v0.0.97
Published
Pre-Beta. Wrapper for common-standards-project api
Downloads
9
Maintainers
Readme
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
Connect
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'
}
{
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