about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2022-12-03 12:45:59 -0500
committerelioat <elioat@tilde.institute>2022-12-03 12:45:59 -0500
commitbd058071de9c2845644984d620fef7b7017a09db (patch)
tree584afb16beba992cc3e7c11d1c15aad36a46428f /src
parent91f177c912c7825532fa5ef3efab85d0dd3d9d9b (diff)
downloaddecember-2022-bd058071de9c2845644984d620fef7b7017a09db.tar.gz
slightly restructured to make more general purpose API call
Diffstat (limited to 'src')
-rw-r--r--src/pokedex.rkt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pokedex.rkt b/src/pokedex.rkt
index 02523b0..38d6ef0 100644
--- a/src/pokedex.rkt
+++ b/src/pokedex.rkt
@@ -18,12 +18,12 @@
 
 
 ;; API URL
-(define *POKE-API* "https://pokeapi.co/api/v2/pokemon/")
+(define *POKE-API* "https://pokeapi.co/api/v2/")
 
 
 (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
+	(call/input-url (string->url (~a *POKE-API* "pokemon/" id)) ; ~a, like string-append but appends *either* strings or numbers to a string
                 get-pure-port
                 (compose string->jsexpr port->string))) ;; QUESTION: could I use read-json here, instead?