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.
twitter-woeid
Advanced tools
Get WOEID for locations that Twitter has trending topic information for.
Twitter uses Yahoo! WOEID for all of their Trends related API endpoints. But that Yahoo! service has been shutdown.
This NPM module offers methods to get WOEID of all locations that Twitter has trending topic information for.
getSingleWOEID(cityName)
Use the above method for getting the WOEID of a City (Local Trends).
Use the above method for getting the WOEID of a Country (National Trends).
getAllWOEID(countryName)
Use the above method for getting the WOEIDs of all cities (that Twitter has trending topic information for) of that country.
Each of the above methods returns an array of matching city/country.
console.log(getSingleWOEID('new york'));
// RETURNS
[{ name: 'New York', country: 'United States', woeid: 2459115 }];
console.log(getSingleWOEID('india'));
// RETURNS
[{ name: 'India', country: 'India', woeid: 23424848 }];
console.log(getAllWOEID('japan'));
// RETURNS
[
{ name: 'Kitakyushu', country: 'Japan', woeid: 1110809 },
{ name: 'Saitama', country: 'Japan', woeid: 1116753 },
...
{ name: 'Okayama', country: 'Japan', woeid: 90036018 },
];
Using destructuring
const [{ woeid }] = getSingleWOEID('chennai');
twit.get('trends/place', { id: woeid })
.then(res => console.log(res.data[0]))
.catch(e => console.log(e));
FAQs
Get WOEID for locations that Twitter has trending topic information for.
The npm package twitter-woeid receives a total of 0 weekly downloads. As such, twitter-woeid popularity was classified as not popular.
We found that twitter-woeid 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.