Skip to content

birkin/patron_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

For a few purposes, we access data from our iii-millennium patron-api.

The response that comes back is html and the data elements are simply strings. JSON would be much more useful.

This code converts the patron-api string output into nice json hash elements.

The service is used internally, so no demo link is provided. But to give an example, instead of raw patron-api output like:

<HTML><BODY>
...
PATRN NAME[pn]=Demolast, Demofirst<BR>
P BARCODE[pb]=1 2222 33333 4444<BR>
...
</BODY></HTML>

...it instead returns:

{
    "patrn_name": {
        "label": "PATRN NAME",
        "code": "pn",
        "value": "Demolast, Demofirst" },
    "p_barcode": {
        "label": "P BARCODE",
        "code": "pb",
        "value": "1 2222 33333 4444",
        "converted_value": "12222333334444" }
}

About

parser for iii patron-api

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages