ion-api-token v1.0.1
ion-api-token
this package is meant to handle ionapi file of type backend service
Installation
npm install ion-api-token
it is composed by 5 functions
- InitializeApiFile(filename)
- Status()
- Message()
- RetunrTokenObj()
- GetBaseURL()
InitializeApiFile(filename)
this function analyzes the filename checking if it is of type ionapi and if it is of type backend service if all checks are passed, set the Status to 'OK' and the Message with the text 'All checks passed', on the contrary if there are errors, it set the Status to 'KO' and the Message to the error message
Status()
this function return the status setted by the InitializeApiFile function
values:
- OK : all checks passed
- KO : errors
Message()
this function print the message setted by the InitializeApiFile function if the check of the file fail, then the Message function print the error message if the check of the file pass, then the Message function print the text 'All checks passed'
ReturnTokenObj()
this function return an object that contains the token you can use in an async function or as a promise
GetBaseURL()
this function return the baseurl used for invoking infor ion api in the ionapi file it is the property (iu)