Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Implement API request fetching #13

Merged
merged 6 commits into from
Apr 12, 2022
Merged

Implement API request fetching #13

merged 6 commits into from
Apr 12, 2022

Conversation

Siegrift
Copy link
Contributor

@Siegrift Siegrift commented Apr 7, 2022

https://api3dao.atlassian.net/browse/BEC-247

There are a few things included in this PR:

  • I found out that the jest configuration does not reset mocks which caused me a lot of pain... I've enabled the "good defaults" now
  • I've separated the api fetching into three functions (initiateFetchingBeaconData - starts fetching data for all beacons, fetchBeaconDataInLoop - fetches single beacon data in a loop, fetchBeaconData - makes the actual api call and updates state)
  • I wanted to separate the functions into own modules, but for that I needed shared state - so I've created a tiny module, which acts as an airseeker state (I've didn't include config there though)

@Siegrift Siegrift requested a review from amarthadan April 7, 2022 15:48
@Siegrift Siegrift self-assigned this Apr 7, 2022
@Siegrift Siegrift changed the title Implement API request fetching [WIP]: Implement API request fetching Apr 7, 2022
@Siegrift Siegrift changed the title [WIP]: Implement API request fetching Implement API request fetching Apr 7, 2022
@Siegrift Siegrift changed the title Implement API request fetching [WIP]: Implement API request fetching Apr 7, 2022
@amarthadan amarthadan removed their request for review April 8, 2022 08:10
@Siegrift Siegrift changed the title [WIP]: Implement API request fetching Implement API request fetching Apr 10, 2022
package.json Outdated Show resolved Hide resolved
src/fetch-beacon-data.test.ts Outdated Show resolved Hide resolved
src/fetch-beacon-data.test.ts Outdated Show resolved Hide resolved
src/fetch-beacon-data.ts Show resolved Hide resolved
src/fetch-beacon-data.ts Outdated Show resolved Hide resolved
src/fetch-beacon-data.ts Show resolved Hide resolved
src/main.ts Outdated Show resolved Hide resolved
@Siegrift Siegrift merged commit 1012f1f into main Apr 12, 2022
@Siegrift Siegrift deleted the bec-247 branch April 12, 2022 07:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants