@alheimsins/acos-innsyn

A Node.js module for connecting to the Acos Innsyn solution from Acos.

Usage no npm install needed!

<script type="module">
  import alheimsinsAcosInnsyn from 'https://cdn.skypack.dev/@alheimsins/acos-innsyn';
</script>

README

js-standard-style

acos-innsyn

A Node.js module for connecting to the Acos Innsyn solution from Acos.

This API is based on screenscraping and might break without warning.

API

Configure the module with an options object containing the endpoint.

getUtvalg

Lists all utvalg.

(async () => {
  const { getUtvalg } = require('@alheimsins/acos-innsyn')
  const options = {
    endpoint: 'https://www.baerum.kommune.no/innsyn/politikk'
  }
  try {
    const utvalg = await getUtvalg(options)
    console.log(utvalg)
  } catch (error) {
    console.error(error)
  }
})()

getMedlemmer

Lists all members of a given utvalg.

(async () => {
  const { getMedlemmer } = require('@alheimsins/acos-innsyn')
  const options = {
    endpoint: 'https://www.baerum.kommune.no/innsyn/politikk',
    utvalgId: '8'
  }
  try {
    const medlemmer = await getMedlemmer(options)
    console.log(medlemmer)
  } catch (error) {
    console.error(error)
  }
})()

License

MIT

About

Created with ❤ for Alheimsins

Alheimsins logo