Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.
/ store-link Public archive

Get the store link for a given application on Apple iTunes Store, Google Play Store or Windows Store.

License

Notifications You must be signed in to change notification settings

xipasduarte/store-link

Repository files navigation

store-link Build Status

Note

If you are looking for more control on Apple iTunes Store links or just need one of the stores checkout:

Install

$ npm install --save store-link

Usage

var storeLink = require('store-link');

storeLink(store, id, lang);

/**
 * Examples
 */

storeLink('ios', '376183339', 'us');
//=> https://itunes.apple.com/us/app/id376183339

storeLink('android', 'com.duolingo', 'pt-PT');
//=> https://play.google.com/store/apps/details?id=com.duolingo&hl=pt-PT

storeLink('windows', 'duolingo-learn-languages-for-free/9wzdncrcv5xn', 'pt-pt');
//=> https://www.microsoft.com/pt-pt/store/apps/duolingo-learn-languages-for-free/9wzdncrcv5xn

API

storeLink(store, id, lang)

store

Required

Type: string

The respective store identifier:

  • Apple iTunes Store: ios
  • Google Play Store: android
  • Windows Store: windows

id

Required

Type: string

The string that identifies the application on each store.

Apple iTunes

https://itunes.apple.com/[lang]/app/id[the_id]

Google Play

https://play.google.com/store/apps/details?id=[the_id]&hl=[lang]

Windows

http://www.microsoft.com/[lang]/store/apps/[the_id]

lang

Optional

Type: string; Defaults:

  • Apple iTunes: 'us';
  • Google Play Store: '' (results in the international english store);
  • Windows Store: '' (results in the store of your language preferences);

License

MIT © Pedro Duarte

About

Get the store link for a given application on Apple iTunes Store, Google Play Store or Windows Store.

Resources

License

Stars

Watchers

Forks

Packages

No packages published