Giter Club home page Giter Club logo

faucetpay-api's Introduction

FaucetPay API

An API Wrapper to Interact with FaucetPay.

Installation

This package is best installed through Composer:

composer require mahtab2003/faucetpay

Usage

Before you can get started, you need to get the API Key from FaucetPay. Login to the FaucetPay, go to Faucet Owner Dashboard -> Your Faucet -> Reveal API Key. Use this API key to interact with FaucetPay.

The FaucetPay API exposes the following methods. The available parameters are listed below.

  • listCurrencies: Get the list of all supported currencies.
  • listFaucets: Get the list of all available faucets.
  • getBalance: Get the balance of the faucet.
  • checkAddress: Check if the address is linked to any FaucetPay account.
  • getPayouts: Get the list of all recent faucets.
  • send: Send funds to another FaucetPay account.

Example

use \Mahtab2003\FaucetPay\Api;

// Create a new Api class instance.
$api = new Api('API Key', 'BTC');

// Get the balance of the faucet.
$response = $api->getBalance();

// Check whether the request was successful.
if ($response->isSuccessful()) {
   $data = $response->getData();
   echo 'Your faucet balance is: ' . $data['balance'];
} else {
   echo 'Error: ' . $response->getMessage();
}

License

Šī¸ Copyright 2022 NXTS Developer. Code released under the MPL-2.0 License.

faucetpay-api's People

Contributors

mahtab2003 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.