I was speaking with a friend about having some kind of app to monitor gas prices throughout the year, but moreso throughout shorter time periods, study their patterns in hopes of analyzing gas prices across locations. And I took matters into my own hands to get my friends their optimum gas stations after reading a reddit thread of how someone programmed their home assistant to monitor gas prices. Here's what I came up with:
Handling complex API responses, identifying reliable fuel price data, and managing large JSON structures. I did this by first scraping for gas prices in small cities, majorily in IL. I ended up building it to be compatible with any city in the USA, or any valid zipcode.
I set up a GraphQL API using Apollo Server to integrate with the GasBuddy API for fetching gas station data based on user searches. I then created functions to parse the payload for better user understanding and other functions for comparing gas station stats.
Built using Rust for performance and safety. The scraper utilizes the GasBuddy GraphQL API to fetch and process gas price data efficiently.
Leveraged Reqwest for HTTP requests and Serde for JSON handling. Chose Rust for its strong type safety and efficient performance in networked applications. Ended up using almost 2GB of storage for the project alone, so I am trying to make this into a native app at some point.
The schema defined a GasStation type with fields like name, address, and price. Resolvers used Axios to fetch data from GasBuddy, processing search parameters like location or fuel type. This streamlined the retrieval of precise, filtered gas station information through structured GraphQL queries.
Hassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan MangoHassan Mango