THIS WAY OF APP-TO-APP INTEGRATION IS LEGACY - PLEASE USE THIS INSTRUCTIONS FOR APP TO APP INTEGRATION
The import widget works for integrating the Bring! import on a Website. For other integrations like App-to-App integrations Bring! support the import via Firebase Dynamic links. This dynamic link has to be created by the integrator. This instruction explains how it is done.
Note: The App-to-App integration points to a webpage (or json file - not recommended) that contains the ingredient information to be imported in a structured format. More on this here
Here the steps to get a link:
So, if you want to support this, you have to support the parser (enrich your site with the necessary info so we can parse it) and build the url like this.
Let's say, the following site supports our parser: https://qblog.qoqa.ch/de/posts/3147
This is the resulting dynamic link:
Follow the steps above:
1. add your url to https://api.getbring.com/rest/bringrecipes/parser?url=[yourUrl]
result:
https://api.getbring.com/rest/
bringrecipes/parser?url=https://qblog.qoqa.ch/de/posts/3147
2. base 64 encode the your result of 1.
result:
aHR0cHM6Ly9hcGkuZ2V0YnJpbmcuY29tL3Jlc3QvYnJpbmdyZWNpcGVzL3BhcnNlcj91cmw9aHR0cHM6Ly9xYmxvZy5xb3FhLmNoL2RlL3Bvc3RzLzMxNDc=
3. dd the result of 2. to https://deeplink.getbring.com/import?src=[result of 2.]&v=1
result:
https://deeplink.getbring.com/import?src=
aHR0cHM6Ly9hcGkuZ2V0YnJpbmcuY29tL3Jlc3QvYnJpbmdyZWNpcGVzL3BhcnNlcj91cmw9aHR0cHM6Ly9xYmxvZy5xb3FhLmNoL2RlL3Bvc3RzLzMxNDc&v=1
4. url encode the result of 3.
result:
https%3A%2F%2Fdeeplink.getbring.com%2Fimport%3Fsrc%3DaHR0cHM6Ly9hcGkuZ2V0YnJpbmcuY29tL3Jlc3QvYnJpbmdyZWNpcGVzL3BhcnNlcj91cmw9aHR0cHM6Ly9xYmxvZy5xb3FhLmNoL2RlL3Bvc3RzLzMxNDc%26v%3D1
5. add the result of 4. to https://kqa9s.app.goo.gl/?apn=ch.publisheria.bring&isi=580669177&ibi=ch.publisheria.bring&ct=appimport&utm_source=chefkoch.de&utm_medium=appimport&utm_campaign=recipe&link=
result:
Many recipe platforms let the user choose for how many people to import the ingredients. This can be done by adding the parameters baseQuantity (the quantity of the source) and requestedQuantity (the quantity to import) in step 1.
For the example above: If the page https://qblog.qoqa.ch/de/posts/3147 contains the ingredients for 4 portions and the import button should import the ingredients for 6 portions, the result of step 1 would be:
https://api.getbring.com/rest/bringrecipes/parser?url=https://qblog.qoqa.ch/de/posts/3147&baseQuantity=4&requestedQuantity=6