i'am trying to integare odoo with imdb.com which have it's own APIs on omdbapi.com
i need to fictch movies as products on odoo then make apurchase orders on it the site says\for searching i should use this api
\\\http://www.omdbapi.com/?apikey="i must but my key here"&t="the movie Name i want to search"
i'am tried to do it by this way
class Api(http.Controller): @http.route('/api', auth='public', methods=["get"]) def index(self, **kw): url = 'http://www.omdbapi.com/?apikey=15439843&t=hello' r = requests.get(url) return r.text
it return a json with data of the movie hello but here it's a static parameter how can i make it dynamic and get the movie name from field or data input then i need to get the json parameters on method create of product.tempalte
add_product = http.request.env['product.template'].sudo().create({ 'name': "movie name form json" }) return add_product
any help well be very appreciated
You can use XML-RPC: http://learnopenerp.blogspot.com/2019/10/connecting-to-odoo-using-xml-rpc.html