Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

anedot-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anedot-api

A simple promise based client to interact with the anedote api

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

Anedot Api

This package offers a simple abstraction of the anedot v2 api

Installation

npm install --save anedot-api

Usage

In order to use utilise this package, you must first instantiate the api which can be done like so:

var AnedotApi = require('anedot-api').AnedotApi;
var anedotClient = new AnedotApi({ apiKey: anedotApiKey, email: anedotEmail });

Where anedotApiKey and anedotEmail correspond to your anedot api key and email respectively

Api Usage

getCampaignList

This method returns a list of all campaigns associated with the user account.

getCampaignDetails(campainId)

This method returns the values of a campaign specified by campaignId.

getCampaignTotalRaised(campainId)

This method returns the goal for the campaign, the total amount raised for the campaign in dollars, the percentage of the goal raised and the percentage remaining.

getDonationList(campainId)

This method returns a list of donations ordered from newest to oldest.

getDonation(number)

This method returns the values of a donation specified by number.

getAccountList

This method returns a list of all accessible organization accounts.

All methods return a promise and are therefore chainable like so

 anedotClient.getCampainList()
 .then(function(campaignList) {
      var firstCampaignId = campaignList[0].uid;
         return anedotClient.getCampaignDetails(firstCampainId);
 })
 .then(function(campaignDetails) {
     console.log(campaignDetails);
 });

Keywords

FAQs

Package last updated on 25 May 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc