
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
google-url-2
Advanced tools
A NodeJS module to interface with Google's URL shortening service.
This library implements a client to consume the API (most of it) documented at https://developers.google.com/url-shortener/v1/getting_started#shorten
It supports the following actions:
Shorten URL Expand Shortened URL Get Analytics for Shortened URL
The three actions supported by this library do not require an API key, but Google recommends getting one here: https://code.google.com/apis/console
var GoogleURL = require( 'google-url' );
googleUrl = new GoogleURL();
// OR
googleUrl = new GoogleURL( { key: 'Your Real Key Here' });
googleUrl.shorten( 'http://bluerival.com/', function( err, shortUrl ) {
// shortUrl should be http://goo.gl/BzpZ54
} );
googleUrl.expand( 'http://goo.gl/BzpZ54', function( err, longUrl ) {
// longUrl should be http://bluerival.com/
} );
googleUrl.analytics( 'http:/goo.gl/BzpZ54', function( err, results ) {
/* format of results will be:
{
created: "An ISO Date",
analytics: {
allTime: {
shortUrlClicks: 2,
longUrlClicks: 3,
referrers: [
{ count: 2, "id": "http://HildoerSystems.com/" } /* , ... */
],
countries: [
{ count: 10, "id": "US" } /* , ... */
],
browsers: [
{ count: 3, "id": "Firefox" } /* , ... */
],
platforms: [
{ count: 6, "id": "Mac" } /* , ... */
]
},
month: { /* same schema as allTime */ },
week: { /* same schema as allTime */ },
day: { /* same schema as allTime */ },
twoHours: { /* same schema as allTime */ }
} */
}
} );
Please report bugs to https://github.com/BlueRival/node-google-url/issues
FAQs
An API client for the Google URL shortening service goo.gl
The npm package google-url-2 receives a total of 0 weekly downloads. As such, google-url-2 popularity was classified as not popular.
We found that google-url-2 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.