These are end-to-end examples in various programming languages.
Python SDK Example
Copy
Ask AI
import timefrom flareio import FlareApiClientapi_client = FlareApiClient.from_env()last_from: str | None = Nonefetched_pages: int = 0for resp in api_client.scroll( method="GET", url="/firework/v2/me/feed/credentials", params={ "from": last_from, },): # Rate limiting. time.sleep(1) resp_data: dict = resp.json() fetched_pages += 1 num_results: int = len(resp_data["items"]) print(f"Fetched page {fetched_pages} with {num_results} results...") # Save the last "next" value. last_from = resp_data.get("next") or last_from for item in resp_data["items"]: print(item)# Note that this endpoint's order is DESC by default, so this would be useful# only for performing full exports.print(f"The next execution could resume using {last_from=}.")