Direct API access? - PlatformIO - M5Core2

I'm really new to the wonderful world of Arduino, but really want to try and get the IoT Cloud function working for a project I'm coding.

I'm not using Arduino Sketches directly, as I'm using Platform IO. My base-board is actually a M5Core2. But when I try and merge both the Arduino default sketch into a M5Core2 project, I can see overlapping library code which means nothing works. This appears to be because the Arduino Library has WiFi functions baked into it, which is clashing with the M5 libraries.

Is there any version of the Arduino libraries that doesn't try and import their own wifi libraries, since M5Core2 has it's own? Or are there any recent coding examples so I can just work directly with the API and avoid all of this chaos?