Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Java example — TCG Price Lookup API

A self-contained Java 11+ example that calls the TCG Price Lookup API using only the JDK standard library — no Maven, no Gradle, no third-party dependencies.

Run

TCGLOOKUP_API_KEY=tlk_live_... java Search.java

Requires Java 11+ (uses java.net.http.HttpClient and the single-file launcher introduced in JDK 11). Get a free API key at tcgpricelookup.com/tcg-api.

What it shows

  • A self-contained TcgLookupClient inner class
  • Search by name + game, then fetch the top hit's full price block
  • Custom TcgLookupException with status code
  • Reading rate-limit headers
  • A tiny zero-dependency JSON parser (MiniJson) — handles the subset of JSON the API returns

Why no Maven / Gradle / Jackson?

To keep this example a single self-contained file you can run with java Search.java. For production code, drop in Jackson or Gson for proper JSON handling and use a real build tool.

A native tcglookup Java SDK isn't published yet. If you want one, open an issue.

Build something bigger