CCALI / a2jauthor

CALI A2JAuthor document automation authoring and viewing platform
https://www.a2jauthor.org
Other
4 stars 1 forks source link

update legalnav endpoints #168

Closed tobiasnteireho closed 3 years ago

tobiasnteireho commented 3 years ago

legalnav servers and queries are changing. Detailed in attached pdf

Legal Navigator API Endpoints(2).pdf

mikemitchel commented 3 years ago

Legal Navigator API Endpoints State Slugs Returns the slug for each state: https://legalnav.org/wp-json/wp/v2/states?_fields=slug Topics For State Returns ID, name and slug of all topics associated with a given state slug: https://legalnav.org/wp-json/wp/v2/topics/ Example to get Alaska’s topics: https://legalnav.org/wp-json/wp/v2/topics/alaska Resource URLs Returns resource name and URL for all resources given a state slug and a topic ID: https://legalnav.org/wp-json/wp/v2/state-topic-resources//<topic_i d> Example to get resource name and URL for resources associated with state slug alaska and topic id 6: https://legalnav.org/wp-json/wp/v2/state-topic-resources/alaska/6 The end goal would be to have the selected resource’s URL placed where the resource ID is currently being placed in the Wysiwyg editor.

mikemitchel commented 3 years ago

@tobiasnteireho found if you remove the ?_fields=slug option you get a states object that has a friendly name on it, aka 'Alaska' Will is going to add an abbreviation as well, just in case we need it in the future, aka 'AK'

for the text template itself will asked for a friendly name like we show now, but as an tag with the resource url mapped to it's src attribute`

tobiasnteireho commented 3 years ago

fixed by #177