Socket
Socket
Sign inDemoInstall

apkmirror-client

Package Overview
Dependencies
96
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    apkmirror-client

Download APKs from APKMirror.com


Version published
Weekly downloads
4
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

0.1.2 (2018-05-10)

Features

  • README, cleanup, updates and fixes (fe4043e)

<a name="0.1.1"></a>

Readme

Source

apkmirror-client

Download APKs from APKMirror.com

Example

Download Whatsapp

'use strict'

const apk = require('apkmirror-client')
const fs = require('fs')

apk.searchForApps('whatsapp', (err, res) => { // search for whatsapp
  if (err) throw err
  let whatsapp = res.filter(r => r.app.name === 'WhatsApp Messenger')[0] // this makes sure we don't get any "whatsapp gold" stuff
  apk.getAppPage(whatsapp, (err, page) => { // now download details
    if (err) throw err
    console.log(page)

    page.versions.filter(v => !v.beta)[0].loadRelease((err, release) => { // now get latest non-beta release
      if (err) throw err
      console.log(release)

      release.estimateBestCandidate('arm64').loadVariant((err, download) => { // now get the arm64 release
        if (err) throw err
        console.log(res)
        download.downloadAPK((err, apk) => { // and finally download the apk
          if (err) throw err
          apk.pipe(fs.createWriteStream('./whatsapp.apk')).on('close', () => { // ...into this file
            console.log('Saved as whatsapp.apk!')
          })
        })
      })
    })
  })
})

Keywords

FAQs

Last updated on 10 May 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc