Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /api/info endpoint #5

Closed
wants to merge 2 commits into from

Conversation

bobo333
Copy link

@bobo333 bobo333 commented Feb 17, 2018

The endpoint returns the following library information

  • libraryExpireDays
  • dataExpireDays
  • apiVersion

@kzalewski I'm not the most experienced in java, so if there are changes you'd like please let me know. I've tested it successfully locally.

Here's an example of the output (json-formatted by my browser)
image

Steven Cipriano and others added 2 commits February 16, 2018 17:26
- returns library information: libraryExpireDays, dataExpireDays, and apiVersion
}

@Override
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initially this was only going to support GET but the BaseApiController requires both doGet and doPost, so I had them both do the same thing. Open to suggestions if there is a preferred approach

@bobo333
Copy link
Author

bobo333 commented Mar 7, 2018

@kzalewski gentle reminder to please have a look at this when you get a chance. I'm happy to contact someone else as well if there is a more appropriate person.

@kzalewski
Copy link
Member

Hi bobo333. I thought we already had an "info" endpoint for the AMS library. Whenever I upgrade the library (after receiving the latest monthly release from USPS), I check it by navigating to /usps-ams/about.jsp. I receive a page that displays the library version, the days until the library expires, and the days until the data expires.

@bobo333
Copy link
Author

bobo333 commented Mar 7, 2018

hi @kzalewski my mistake, I completely missed that. Would you accept a PR adding documentation for that endpoint?

Either way, I'm closing this one, thank you for the review

@bobo333 bobo333 closed this Mar 7, 2018
@bobo333 bobo333 deleted the add_expiration_endpoint branch March 7, 2018 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants