Using the absolute_url #4728
Unanswered
edrobinson
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Ed, rather than doing a GET on the front end, you should use the API to get the data you want. In this case, you're getting a |
Beta Was this translation helpful? Give feedback.
0 replies
-
Mike, Thanks |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A While ago i asked about HTTP 202 code..
Well it's still a PITA.
What I am trying to do:
I want to run the search API, then use it's results to find opinions of interest.
About me:
I use PHP, JS, Smarty Templates and Jaxon PHP package for client <---> server communication.
I am a GitHub and composer fan and, being lazy, use them as much as possible.
I believe in heavily commented code.
I am retired after over 40 years of this "stuff."
I drink too much coffee and work stupid hours.
Here's what I'm doing:
I have a written a PHP class that runs the API requests. It uses a curl wrapper designed after Python's request and it works well.
See https://github.com/php-curl-class/php-curl-class .
My class has a separate a method for each AP I want to use and "utility" methods that do all things in support of the API code. Additional APIs can be added with just a few lines of code as they are all treated similarly.
How it works:
A simple web page presents the user with an input for their search query and a button to kick off the search.
The user types in their query string and clicks the "Go" button.
I receive the query and call the search API with it.
The query: "Statutory Co-" , I.C. 72 209(3) returns 9 hits like this:
I build an HTML select using the case names and absolute URLs and send it back to the page
The user clicks an option and I receive the absolute URL.
Now, using that URL, I do a GET on the CL front end URL like:
https://www.courtlistener.com/opinion/9427848/smith-v-excel-fabrication-llc/ and it returns:
Click on that url and it displays CL opinion. Drat!
So, is the 202 code the "I got it and will return something later - or maybe not." code?
If so, how do I deal with it?
I have also tried using the opinion id in the absolute_url to query the opinions API but it doesn't seem to recognize them . . .
Am I even approaching this in a reasonable fashion?
I still do not have a clear understanding of how the API's relate to each other.
The OPTION requests on them clear up the field uses somewhat but the relations are not clear.
I need to dig into the data models some more - ya think?
any help would be appreciated.
Thanks . . .
Beta Was this translation helpful? Give feedback.
All reactions