squidgetx / arklet

ARK minter, binder, resolver with custom detailing for the Frick Art Museum
MIT License
3 stars 7 forks source link

Metadata #10

Closed squidgetx closed 1 year ago

squidgetx commented 1 year ago

See #1, #2, #3, #4

From Jack: add these metadata fields:

https://docs.google.com/spreadsheets/d/1qQ9p7rVJQUxJnk0Hhtnodov61tmep8IvbRWU3S5HnGs/edit#gid=0

and have endpoints ?info to surface human readable information and ?json to surface json information

The json should include metadata about the types of each column (example:

{
    "url" : {
        "property" : "https://schema.org/url",
        "type" : "https://schema.org/URL",
        "value" : "https://library.frick.org/permalink/01NYA_INST/1qqhid8/alma991000000019707141"
    },
    "title" : {
        "property" : "http://purl.org/dc/elements/1.1/title",
        "type" : "xsd:string",
        "value" : "Bibliographie zur kunstgeschichtlichen Literatur in ost- und südosteuropäischen Zeitschriften."
    },
    "relation" : {
        "property" : "http://purl.org/dc/elements/1.1/relation",
        "type" : "xsd:anyURI",
        "value" : "https://ark.frick.org/ark:37624/an1abc123",
        "label" : "Frick Auction Catalogs"
    },
    "source" : {
        "property" : "http://purl.org/dc/elements/1.1/source",
        "type" : "xsd:anyURI",
        "value" : "https://yamz.net/term/ark/h3886",
        "label" : "null"
    }
}

test plan:

squidgetx commented 1 year ago

Also fixes a bug. before if you update one field but not the others (eg, updating URL but not metadata) the field you did not update would get set to the empty string, lol,. this is fixed now.

squidgetx commented 1 year ago

I also added some sampel scripts to call the API to mint and update ARKs. Not necessarily the final form the cmd ui but good for us to be able to test data etc.