Consenticus
Consenticus API client for the browser and node.js
Installing
Using npm
$ npm install consenticus
Using cdn
How to use
In browser
consenticus API
consenticus().createConsent(params)
consenticus().getConsent(consent_uuid)
consenticus().getConsents()
consenticus().getConsentRequest([request_uuid])
consenticus().getConsentRequests()
consenticus().getEntity(entity_uuid)
consenticus().updateConsent(consent_uuid, params)
Creating an Instance
You can create a new instance of consenticus with a consent_request UUID, custom host and auth_token
const consenticus_instance = request_uuid host="http://127.0.0.1:8000" auth_token="auth_token";
getEntity(entity_uuid)
consenticus_instance; <!-- entity --><!-- uuid: "365f0d37-5d3d-471a-aa38-ea11cc6cf399" name: "Datafy.Network" country: "SI" address: "Ljubljana" phone: null … -->
getConsents()
consenticus_instance; <!-- consent --><!-- count: 12 next: "http://127.0.0.1:8000/api/v1/consents?page=2" previous: null results: Array10 -->
getConsentRequests()
consenticus_instance;
createConsent(params)
// example of parameters structurelet params = "request_uuid": "user_consent_request_uuid" "rejected": false "data_item_inputs": "data_item_uuid": "fe92335c-abb7-40d6-b1be-7e7300ed14f5" // DataItem uuid (i.e. email) "value": "email@email.com" "consent_item_inputs": "consent_item_uuid": "210aec41-733c-4aa5-be74-e13902efaadf" "value": true "consent_item_uuid": "1dbf9fb2-f49f-4126-90e9-f29435515018" "value": false consenticus_instance;