Hi,
I have been creating mobile applications using Flutter, what I want to do right now is fetch the data from my Shopify store.
I have never worked with API’s before but I know the purpose of using them. I am looking at different guides online but the information is very overwhelming.
I have managed to fetch my data using this function:
getUserData() async {
var response = await http.get(Uri.https(
'{apikey}:{password}@{hostname}.myshopify.com',
'/admin/api/{version}/{resource}.json'));
var jsonData = jsonDecode(response.body);
print(jsonData);
}
{resource} in this case is Customer, adding getUserData() to a button I now print out my customers, this took me like 8h to set up.
I wont be asking any specific questions, but since this thing with API’s is new to me and I wouldnt call myself a Flutter expert aswell. Are there any good guides out there? I would like to fetch my data with storefront API, I’ve got the token but I have no clue how to use it in my code so I can access the data. I am reading the storefront documentation on shopify but being new to all this it just feels it’s over my head to grasp.
Edit: I will be setting up querys using GraphQL (graphql_flutter 5.0.0 is imported)