RIS-BKA
Usage
$ npm install
// In your project import the 'ris-bka' modulevar RisBka = ;// Use this object to execute methods (listed below)
Methods
- getVersion:
RisBka.getVersion(cbOk, [cbFail])
- searchDocuments:
RisBka.searchDocuments(query, cbOk, [cbFail])
- getDocument:
RisBka.getDocument(docId, cbOk, [cbFail])
Callbacks
- cbOk:
function (soapBody, [raw]) { ... }
- Executed if all works fine - cbFail:
function (err, soapBody, [raw]) { ... }
- Executed if any error appears
Parameter
- query:
- Type:
Object
- More: Look Query-Structure
- Type:
- docId:
- Type:
String
- Example:
'NOR40091435'
- Type:
- err:
- Type:
Object
- Structure:
{ errorType: 'String', error: { ... } }
- Type:
- soapBody:
- Type:
Object
- More: Look soapBody-Structure
- Type:
- raw:
- Type:
Object
- Structure:
{ error: { ... }, response: { ... }, body: { ... } }
- Info: Response parameters from request module
- Type:
Object-Structure
Query
searchTerms: {} // SearchExpression title: {} // SearchExpression index: {} // SearchExpression section: number: start: 1 // Start-Number (Integer) end: 2 // End-Number (Integer) character: start: 'a' // Start-Character end: 'z' // End-Character typ: '' // "Alle", "Artikel", "Paragraph", "Anlage" versionDate: '' // Date announcementInstitution: '' // PhraseSearchExpression announcementInstitutionNumber: '' // PhraseSearchExpression includedDate: '' // "Undefined", "EinerWoche", "ZweiWochen", "EinemMonat", "DreiMonaten", "SechsMonaten", "EinemJahr" paging: docsPerPage: '' // "Ten", "Twenty", "Fifty", "OneHundred" page: 1 // Integer [required] sort: direction: '' // "Ascending", "Descending" [required] column: '' // "ArtikelParagraphAnlage", "Kurzinformation" [required]
SearchExpression
{}
represents a search expression
// AND and: {} ...// OR or: {} ...// NOT// NOT IMPLEMENTED YET!!!//{// not: {}//}// MASK mask: 'SearchString' // automatically gets '*' attached -> 'SearchString*'// VALUE value: 'SearchString'// SHORTCUT'SearchString' // Same as VALUE
soapBody
getVersion
'OGD_1.3.0'
searchDocuments
paging: page: 'Integer' size: 'Integer' count: 'Integer' results: application: 'String' documentNumber: 'String' articleParagraphAttachment: 'String' shortInformation: 'String' documentUrl: 'String' ...
getDocument
application: 'String' documentNumber: 'String' shortTitle: 'String' announcementInstitution: 'String' typ: 'String' articleParagraphAttachment: 'String' comeIntoForceDate: 'Date' exceptIntoForceDate: 'Date' abbreviation: 'String' signingDate: 'Date' indices: 'String' ... transitionLaw: 'String' considerForWholeLaw: 'String' consider: 'String' change: 'String' longTitle: 'String' languages: 'String' states: 'String' noteForWholeLaw: 'String' note: 'String' keywords: 'String' releaseDate: 'Date' changeDate: 'Date' lawNumber: 'String' oldDocumentNumber: 'String' documentContent: contentType: 'String' name: 'String' dataType: 'String' risDoc: metaData: ... userData: ... layoutData: ... ...