Commit eabdd510 authored by Panagiotis Skarvelis's avatar Panagiotis Skarvelis
Browse files

update readme

parent bb8f5a08
# Emepclient
# Client for getNncIdentity service of KED
Client to connect EMEP service, useful for use with nextjs/nodejs projects.
\ No newline at end of file
Client to connect EMEP service, useful for use with nextjs/nodejs projects.
#### Example:
```
import getIdentity from '@digigov-oss/get-nnc-identity-client';
const test = async () => {
const overides = {
prod:false,
auditInit: {
auditUnit: 'grnet.gr',
},
auditStoragePath: '/auditStorage',
}
try {
const Identity = await getIdentity("052704062", "username", "password",overides);
return Identity;
} catch (error) {
console.log(error);
}
}
test().then((identity) => { console.log('getNncIdentityOutputRecord',identity); });
```
* you can use `overides` to override the default values
* for test you dont need to use the `overides`, in that case default storage path will be used `/tmp`
* look at [KED](https://www.gsis.gr/dimosia-dioikisi/ked/) common guides for records you can use on auditInit"
#### Returns
an object like the following:
```
{
countryCode: 'GRC',
countryDescr: 'Ελλάδα',
addressStreet: 'Βενιζέλου Ελευθερίου',
addressNumber: '86',
addressCity: 'Αθήνα',
telephone: '2101234567',
countryCode2: 'GRC',
countryDescr2: 'Ελλάδα',
addressStreet2: 'Ιάσονος',
addressNumber2: '14',
addressCity2: 'Αθήνα',
mobile: '6979114217',
email: 'andreas-hal@hotmail.com',
epikForeisFlag: '1',
epidForeisFlag: '1'
}
```
or an error message like:
```
{ message: 'Ο Α.Φ.Μ. δεν είναι καταχωρημένος' }
```
#### Available AFM for testing:
019285930, 052704062, 076509078
##### * Notes
you have to ask KED for notificationCenter_v_0.95 documentation to get more info about the output and error fields.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment