diff options
-rw-r--r-- | src/pokedex.rkt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pokedex.rkt b/src/pokedex.rkt index 0302cb0..488858c 100644 --- a/src/pokedex.rkt +++ b/src/pokedex.rkt @@ -14,13 +14,12 @@ ;; basic GET request (require net/url) (require json) -(require nested-hash) ;; package that makes traversing nested hash tables a wee bit easier, not certain if I'll need it + ;; API URL (define *POKE-API* "https://pokeapi.co/api/v2/pokemon/") -;; info about this form, -;; https://medium.com/chris-opperwall/practical-racket-using-a-json-rest-api-3d85eb11cc2d + (define (get-pokemon id) "queries the api, returns a butt ton of info" (call/input-url (string->url (~a *POKE-API* id)) ; ~a, like string-append but appends *either* strings or numbers to a string @@ -38,4 +37,6 @@ (hash-set! entry-data "types" (hash-ref poke-data 'types)) entry-data)) -(dex-entry 12) \ No newline at end of file +(dex-entry 12) + +;; TOMORROW I'll start to figure out how to present this data \ No newline at end of file |