• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Accessing and display an API in Java

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, I am currently a college student and trying to supplement my studies by learning Spring / Spring Boot outside of the classroom.

My goal is to have a user login, enter in a search term, access an api using that search term, then displaying the JSON data.

The structure of my web app so far is as follows:



Reitual2Application.java


WebSecurityConfig.java (I will be changing the username and password setup here, just have it hardcoded with demo info for now)


MvcConfig.java


SearchController.java


Search.java


admin.html


login.html


result.html


I will be getting JSON data from the Listen Notes API (https://www.listennotes.com/api/).

In the documentation, it supplies the following code snippet to search a term in the API:


My question is, what is the best possible route to take that will allow me to enter the users input into that search URL where it says "search?1=" then display some of the JSON data on my result.html page?

I'm sorry if this is a terrible question, I've just been searching around and finding it difficult to figure out how I can process the data that is entered into my search box.

Any suggestions for documentation, how-to's, etc that will help me accomplish this would be greatly appreciated. Please don't hesitate if there is anything I can access for clarity.

Thank you all for your time,
Doug
 
Bartender
Posts: 2266
13
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Doug,
Are you searching for a Movie object?
Suppose your Movie object has attributes q, sort_by_date, type, offset, len_min , len_max, genre_ids, published_before, published_after, only_in, language, safe_mode.
For your reference, you may want to do something like this:
 
Doug Mellon
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im on my phone right now but will give this a shot tonight. Thank you so much for your time.
 
reply
    Bookmark Topic Watch Topic
  • New Topic