I have the following scenario:
there are 3 API's that I call every 5 minutes. I do this asynchronously so the order of calling the API
doesn't matter. A 'call' itself contains
- A
HTTP
-request to theAPI
- The extraction of data (reading the response)
- Storing it into a Database.
so these 3 steps are always the same. Currently my code looks somewhat like this:
scraper.Request()
scraper.Extract()
scraper.Save()
I surely put that into another function to wrap it up but it somehow looks weird to me. Are there any 'Patterns' I could follow, that match my scenario?
Thanks in Advance
Aucun commentaire:
Enregistrer un commentaire