![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
opentable-widget
Advanced tools
This package dynamically generates a OpenTable reservation widget link and an OpenTable restaurant ID's (`rid`) using a restaurant's name and location.
This package dynamically generates a OpenTable reservation widget link and an OpenTable restaurant ID's (rid
) using a restaurant's name and location.
OpenTable provides a to generate OpenTable widgets. Unfortunately there is no official API to dynamically generate widgets. OpenTable does not have any public API's.
npm install opentable-widget
const getWidget = require('opentable-widget');
const restaurantName = 'terroni'
const location = {
city: 'toronto',
state: 'ontario',
zip: 'M6J 1E8',
}
const options = {
theme: 'button',
language: 'en-CA',
}
getWidget(restaurantName, location, options).then(widget => {
const scriptElement = document.getElementById('some-script-element');
scriptElement.type = 'text/javascript'
scriptElement.src = widget.source;
console.log(widget.source);
});
// '//www.opentable.ca/widget/reservation/loader?rid=112426&type=multi&theme=standard&iframe=true&domain=ca&lang=en-CA&newtab=false&ot_source=Restaurant%20website'
The widget source, as OpenTable intends, should be set as the src
property of a script tag in order to be rendered.
Since this package scrapes raw HTML from multiple sources to find rid
's and widgets, there is a chance for incorrect data to be returned if not all search parameters are given.
The package needs the restaurant name at a minimum. Providing additional location data of the restaurant such as city, state, country and zip codes will improve the accuracy of the widget returned.
If all location parameters city
, state
, country
and zip
are provided, it is guaranteed that the widget returned is correct.
An optional options parameter can be passed to getWidget
to alter the type of widget returned.
Possible options: theme
, language
, iframe
, newtab
Defaults: 'standard'
, 'en-US'
, true
, false
Check the OpenTable widget website for the values available for each of these options.
FAQs
This package dynamically generates a OpenTable reservation widget link and an OpenTable restaurant ID's (`rid`) using a restaurant's name and location.
We found that opentable-widget demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.