safedonate
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

SafeDonate API (unofficial)

typescript

An (unofficial) API for SafeDonate, with full types support

Important notice

This API is unofficial, meaning I am not responisble for any damage caused by using this API. This API may be blocked at any time by SafeDonate's team. This API is never stable as SafeDonate can change at any time their website structure that will break this API.

Install

npm install safedonate
# or
yarn add safedonate

Usage

import { fetchDonations } from "safedonate";

fetchDonations().then((donations) => {
  console.log(donations[0]);
});
//=> JSON object containing donation info

(also compitable with commonjs)

API

fetchDonations()

Example

const { fetchDonations } = require("safedonate");

fetchDonations().then((donations) => {
  console.log(donations[0]);
});

Will return something like this:

{
  "URL (public)": "",
  "Title (public)": "",
  "Description (public)": "",
  "Verification Result (public)": "",
  "Original Message (public)": "",
  "Is International? (public)": "",
  "title_english": "",
  "title_spanish": "",
  "title_french": "",
  "title_german": ""
}

Which can be easily accessed by doing (thanks to the types available in the package):

const { fetchDonations } = require("../build/index");

fetchDonations().then((donations) => {
  console.log(donations[0]["URL (public)"]);
});

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i safedonate

      Weekly Downloads

      3

      Version

      1.0.0

      License

      ISC

      Unpacked Size

      7.71 kB

      Total Files

      11

      Last publish

      Collaborators

      • ronuss