eureka2 / G6K

Generator of calculation simulator (calculator)
MIT License
20 stars 19 forks source link

Error : API for this simulator is not implemented #56

Open mohamedlouay opened 2 years ago

mohamedlouay commented 2 years ago

Hi , i want to use the simulator as API to be implemented in an externel website , i have added the following lines to the

"\config\packages\g6k.yml" .

    # api configuration
     api:
         cout-certificat-immatriculation: 
             step: 0
             action: Calculer 

image

then i have cleared the cache using this command :

    php bin/console cache:pool:clear cache.global_clearer

image

here is the request's result using API :

http://localhost/simulateur2/calcul/cout-certificat-immatriculation/api?demarche=1&franceOuImport=1&typeVehicule=1&declareVehiculeDemonstration=2&puissanceAdministrative=52&energie=1&invalidite=2&receptionCommunautaire=1&tauxCO2=350&departement=92&declareVehiculeDeCollection=2

image

Thanks for your time

mohamedlouay commented 2 years ago

I found the solution , the problem was in indentation here

image

after that i have cleared the cach using these commands :

php bin/console cache:pool:clear cache.global_clearer
php bin/console cache:clear --no-warmup --env=dev
php bin/console cache:clear --no-warmup
ShoweRocket commented 1 year ago

Bonjour @mohamedlouay,

Je suis conscient que votre poste remonte à plus d'un an, mais j'aimerai savoir si vous pouviez m'aider à intégrer le simulateur sur un site externe avec le mode API.

D'avance merci