*       *       *       *       *       *       *       *       *       *       *       *       *       *       *       *       *       *       
*   servisni funkce v kantynovych datech 


DO (LOWER(JUSTPATH(sys(16))) + "\http_ppgm") WITH "https://alto:1991.Altopraha@canteen-dts-backend.alto-production.mine.nu/"

*DO (LOWER(JUSTPATH(sys(16))) + "\http_ppgm") WITH "https://admin:1991.Altopraha@canteen-cmms-backend.alto-production.mine.nu/"
*DO (LOWER(JUSTPATH(sys(16))) + "\http_ppgm") &&&&&WITH "https://canteen-parlament-backend.alto-production.mine.nu/"
*DO (LOWER(JUSTPATH(sys(16))) + "\http_ppgm") WITH "https://admin:admin@canteen-skf-backend.alto-production.mine.nu/"


*http_request("canteen/crud/course_groups/lunch" , "PATCH", '{"served_at":"08:08:08","lock_before":"12:00:00"}')

*http_request("canteen/crud/courses/lunch", "DELETE", '')
*http_request("canteen/crud/courses"      , "POST", '{"name":"lunch_main","group":"lunch","display_name":"Hlavni jidla","order_number":6,"is_additional":false}')
http_request("canteen/crud/courses"      , "POST",  '{"name":"lunch_pre" ,"group":"lunch","display_name":"Polevky","order_number":2,"is_additional":false}')


json = http_get('canteen/crud/canteens')
json = http_get('canteen/crud/course_groups')
json = http_get('canteen/crud/courses')





RETURN 
RETURN 
RETURN 



json = http_get("sk/crud/bill_headers")
json = http_get("sk/crud/bill_items")
json = http_get("sk/crud/bill_payments")
json = http_get("sk/crud/products")



http_request("canteen/crud/canteens", "POST", '{"name":"SKF CHodov","register_number":-999}')

http_request("canteen/crud/course_groups" , "POST", '{"name":"breakfast","display_name":"SnÝdaný","served_at":"06:00:00","lock_before":"00:00:00","order_number":1}')
http_request("canteen/crud/course_groups" , "POST", '{"name":"lunch"    ,"display_name":"Obýd"   ,"served_at":"10:00:00","lock_before":"00:00:00","order_number":2}')
http_request("canteen/crud/course_groups" , "POST", '{"name":"dinner"   ,"display_name":"VeŔe°e" ,"served_at":"18:00:00","lock_before":"00:00:00","order_number":3}')

http_request("canteen/crud/courses"       , "POST", '{"name":"lunch_main","group":"lunch","display_name":"Hlavní jídla"    ,"order_number":5,"served_at":"12:00:00"},"is_additional":false')



*2018-08-27T14:07  GET canteen/crud/canteens
*{"id":1,"name":"06 SnýmovnÝ 1","register_number":null}



*= http_request("canteen/crud/orders/605", "DELETE", '{"ordered":0}')
*= http_request("canteen/crud/orders/12", "PATCH", '{"ordered":0}')



*2018-08-27T14:07  GET canteen/crud/canteens
*{"id":1,"name":"06 SnýmovnÝ 1","register_number":null}
*{"id":2,"name":"01 SnýmovnÝ 4","register_number":null}

      *      *      *      *      *      *      *      *      *      *      *      *      *      *      *      *      *      *      *      *      *      *
*2018-08-27T14:07  GET canteen/crud/course_groups
*{"name":"breakfast","display_name":"SnÝdaný","served_at":"06:00:00","lock_before":"00:00:00","order_number":1}
*{"name":"dinner","display_name":"VeŔe°e","served_at":"14:00:00","lock_before":"00:00:00","order_number":3}
*{"name":"lunch","display_name":"Obýd","served_at":"08:00:00","lock_before":"20:00:00","order_number":2}


*= http_request("canteen/crud/canteens/2", "PATCH", '{"register_number":23}')
*= http_request("canteen/crud/course_groups/lunch" , "PATCH", '{"served_at":"10:30:00","lock_before":"20:20:00"}')


*= http_request("canteen/crud/orders/13", "PATCH", '{"eaten":0}')

*= http_request("canteen/crud/course_groups/breakfast" , "PATCH", '{"name":"breakfast","display_name":"Snidane","served_at":"08:00:00","lock_before":"00:00:00","order_number":1}')
*= http_request("canteen/crud/course_groups/lunch"     , "PATCH", '{"name":"lunch"    ,"display_name":"Oběd"   ,"served_at":"09:00:00","lock_before":"00:00:00","order_number":2}')
*= http_request("canteen/crud/course_groups/dinner"    , "PATCH", '{"name":"dinner"   ,"display_name":"Večeře" ,"served_at":"18:00:00","lock_before":"00:00:00","order_number":3}')


*= http_request("canteen/crud/course_groups/lunch"     , "PATCH", '{"served_at":"11:30:00","lock_before":"22:00:00"}')

*{"name":"lunch","display_name":"Obed","served_at":"09:00:00","lock_before":"00:00:00","order_number":2}



*= http_request("canteen/crud/courses", "POST", '{"name":"lunch_pre" ,"group":"lunch","display_name":"Polévky a saláty","order_number":5,"served_at":"12:00:00"},"is_additional":false')
*= http_request("canteen/crud/courses", "POST", '{"name":"lunch_main","group":"lunch","display_name":"Hlavní jídla"    ,"order_number":6,"served_at":"12:00:00"},"is_additional":false')
*= http_request("canteen/crud/courses", "POST", '{"name":"lunch_side","group":"lunch","display_name":"Přílohy"         ,"order_number":7,"served_at":"12:00:00"},"is_additional":true')

*= http_request("canteen/crud/courses/lunch_side", "PATCH", '{"name":"lunch_side","group":"lunch","display_name":"Přílohy","order_number":7,"served_at":"12:00:00","is_additional":true}')

*= http_request("canteen/crud/courses/dinner", "PATCH", '{"order_number":9}')

*{"name":"dinner","group":"dinner","display_name":"Vecere","order_number":3,"is_additional":false}



*= http_request("canteen/crud/courses/lunch", "DELETE", '')

*radek = '{"name":"dinner","group":"dinner","display_name":"Vecere" ,"order_number":9,"served_at":"18:00:00"}'
*json = http_request("canteen/crud/courses/dinner", "PATCH", m.radek)

*{"name":"lunch_pre" ,"group":"lunch","display_name":"Polévky a saláty","order_number":2,"is_additional":false},
*{"name":"lunch_main","group":"lunch","display_name":"Hlavní jídla","order_number":3,"is_additional":false},
*{"name":"lunch_side","group":"lunch","display_name":"Prílohy 1","order_number":4,"is_additional":true},


*FOR iii = 1 TO 99
*    id_txt = ALLTRIM(STR(m.iii))
*    http_request("canteen/crud/meals/" + m.id_txt, "DELETE", "")
*ENDFOR 


json = http_get('canteen/crud/canteens')
json = http_get('canteen/crud/course_groups')
*json = http_get('canteen/crud/courses')
*json = http_get('canteen/crud/meals')
*json = http_get('canteen/crud/orders')

oznam_hotovo()
