mardi 1 décembre 2020

What's the simplest way to make API calls and save the results in plain text? [closed]

I need to call an API through the GET method in sequence and save the results on different files on my computer.

There's no authentication needed for the GET method.

I need something that resembles this (pseudocode):

for (i from 0 to 1000) {
    jsonFile = callApi("example.website.com/v1/thing/" + i)
    localFile = createFile(i + ".json")
    save(localFile, content = jsonFile)

This is a for a personal project and I seek a simple and pragmatic solution.




Aucun commentaire:

Enregistrer un commentaire