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

@sadzurami/kopeechka-store

v1.0.2

Published

A JavaScript wrapper around the kopeechka.store api.

Downloads

21

Readme

Kopeechka Store JS

Wrapper around the kopeechka.store email api written with TypeScript for NodeJS and Browser.

The service provides you with real and unique email addresses to receive messages.

Installation

npm

npm install @sadzurami/kopeechka-store

yarn

yarn add @sadzurami/kopeechka-store

CDN

<script src="https://cdn.jsdelivr.net/gh/Sadzurami/kopeechka-store@latest/kopeechka.min.js"></script>

Requirements

Node.js > 15 or any modern browser

Documentation

Getting started

import Kopeechka from '@sadzurami/kopeechka-store'

const kop = new Kopeechka('<personal access token>')

const start = async () => {
  const address = await kop.getAddress({ website: 'example.com' })
  console.log(address)
  //=> [email protected]
}

start()

Account

Balance

kop.getBalance().then(console.log)

Address

Get new email address

Method that gives a Promise returning an email address string.

Arguments: options (object).

Options may contain the following fields:

  • website (string) - Required. The website for which the address is ordered.
  • domains (string | string[]) - Optional. Preferred address domains. Default - random temp domains.
  • filter (object) - Optional. Message filtering options.

Filter options may contain the following fields:

  • sender (string) - Optional. Sender of the message.
  • subject (string) - Optional. The subject of the message.
kop
  .getAddress({
    website: 'example.org',
    domains: ['gmail.com', 'yahoo.com'],
    // domains: 'outlook.com,aol.com' - also valid
    filter: {
      sender: '[email protected]',
      subject: 'Please confirm your email'
    }
  })
  .then(console.log)

Reuse address

Method that gives a Promise returning an operation status boolean.

Arguments: options (object).

Options may contain the following fields:

  • website (string) - Required. The website for which the address is ordered.
  • address (string) - Optional. Earlier received email address. Default - last ordered address on this instance, if it exists.
kop
  .reuseAddress({
    website: 'example.org',
    address: '[email protected]' // optional
  })
  .then(console.log)

Release address

Method that gives a Promise returning an operation status boolean.

Arguments: id (string).

  • id (string) - Optional. Task id. Default - id of last ordered address on this instance, if it exists.
kop.releaseAddress('1434984329').then(console.log)

Message

Receive message

Method that gives a Promise returning a message string.

Arguments: options (object).

Options may contain the following fields:

  • id (string) - Optional. Task id. Default - id of last ordered address on this instance, if it exists.
  • timeout (number) - Optional. Timeout of message waiting in ms. Default - 120000.
  • delay (number) - Optional. Delay between requests in ms. Default - 10000.
  • full (boolean) - Optional. Retrieves the full body of the message in any case. Specify false to get only the parsed part of the message, this can be useful to save bandwidth. Sometimes the server cannot parse a message, in which case the full message will be returned. It's better to get the full message and parse it on your side. Default - true.
kop
  .getMessage({
    id: '1434984329',
    timeout: 120000,
    delay: 10000,
    full: false
  })
  .then(console.log)

Domain

List Domains

Method that gives a Promise returning an array of domain objects.

Shortcut of getPopularDomains and getTempDomains methods with compatibility.

Arguments: options (object).

Options may contain the following fields:

  • website (string) - Optional. The website for which domains are available.
  • temp (boolean) - Optional. Retrieves temporary domains resource. Dafault - true.
  • popular (boolean) - Optional. Retrieves popular domains resource. Default - true.
kop
  .getDomains({
    website: 'example.org',
    popular: true,
    temp: true
  })
  .then(console.log)

Popular domains resource

Method that gives a Promise returning an array of domain objects.

Arguments: website (string).

  • website (string) - Optional. The website for which domains are available.
kop.getPopularDomains('example.com').then(console.log)

Temporary domains resource

Method that gives a Promise returning an array of domain strings.

Arguments: website (string).

  • website (string) - Optional. The website for which domains are available.
kop.getTempDomains('example.com').then(console.log)

Task

Find the task id

Method that gives a Promise returning an id string.

Arguments: options (object).

Options may contain the following fields:

  • website (string) - Required. The website for which the address is ordered.
  • address (string) - Required. Earlier received email address.
kop
  .findTaskId({ website: 'example.org', address: '[email protected]' })
  .then(console.log)

Find tasks

Method that gives a Promise returning an array of task objects.

Arguments: options (object).

  • website (string) - Required. The website for which the address is ordered.
  • address (string) - Optional. Earlier received email address.
  • comment (string) - Optional. Task comment.
  • limit (number) - Optional. The number of returned tasks. Default - 1.
kop
  .findTasks({
    website: 'example.org',
    address: '[email protected]',
    comment: 'good',
    limit: 1
  })
  .then(console.log)

Questions And Suggestions

If you have any questions, please contact service support.

If you have any suggestions, please contact me via email [email protected].