npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

adcash

v2.1.1

Published

Effortlessly automate your AdCash campaigns through Node.js, all powered by the Puppeteer framework.

Downloads

8

Readme

AdCash

AdCash is an unofficial Node.js library that allows you to effortlessly automate your AdCash campaigns through Node.js, all powered by the Puppeteer framework.

Getting Started

Installation

To use AdCash in your project, you'll also need to install Puppeteer. To install all the necessary libraries, run:

# Install the AdCash library
npm i adcash

# Install the Puppeteer framework
npm i puppeteer

In order for AdCash to work properly, you need to download a supported browser that can be used to automate Chrome. When you install Puppeteer, a recent version of Chrome for Testing will be automatically downloaded at the $HOME/.cache/puppeteer folder. This browser is known to work with Puppeteer.

To learn more about Puppeteer, you can visit the Puppeteer documentation.

Logging in

To get started with automating your AdCash campaigns, you'll first need to authenticate with your AdCash account. Please note that you'll need to run the commands asynchronously. To do this, you can use:

const AdCash = require('adcash');

(async () => {
	const adCash = new AdCash();
	await adCash.login('[email protected]', 'password123'); //Login to account
})();

By default, Puppeteer will use headless mode to automate your AdCash campaigns. If you would like to pass an argument for the Puppeteer browser, you can use:

const AdCash = require('adcash');

(async () => {
	const adCash = new AdCash();
	await adCash.login('[email protected]', 'password123', { headless: false, args: ['--start-fullscreen'] }); //Specify argument for Puppeteer
})();

Please make sure to replace the email and password provided in the example above with your AdCash account credentials.

Start or Stop

To start and stop your AdCash campaign, you can use the start() and stop() functions. An example of this would be:

const AdCash = require('adcash');

(async () => {
	const adCash = new AdCash();
	await adCash.login('[email protected]', 'password123');

	adCash.start(12345678); //Starts the campaign
	//...//
	adCash.stop(12345678); //Stops the campaign
})();

When using this example, make sure to replace the digits with your AdCash Campaign ID. You do NOT need to run these command asynchronously.

Logging out

To log out of your current AdCash account, you can use:

const AdCash = require('adcash');

(async () => {
	const adCash = new AdCash();
	await adCash.login('[email protected]', 'password123');
	
	await adCash.logout(); //Logout of account
})();

Cappings

To configure the cappings of your camapign, you can run:

const AdCash = require('adcash');

(async () => {
	const adCash = new AdCash();
	await adCash.login('[email protected]', 'password123');
	
	await adCash.capping(12345678, ['', '10000', false]); //Sets the capping
})();

This command requires the following arguments:

  1. Your campaign ID
  2. An array with the daily budget, daily impressions, and whether or not you want to spread the budget throughout the day (true or false boolean)