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

@dapp-sdk/analytics-dapplooker

v1.0.1

Published

SDK for retrieving DappLooker chart data

Downloads

9

Readme

DappLooker Analytics SDK

The @dapp-sdk/analytics-dapplooker provides developers with programmatic access to reliable and comprehensive blockchain data in the Web3 environment. By integrating the DappLooker SDK, you can easily retrieve popular charts data for your decentralized applications (Dapps).

Node version: >=14

Installation

To start using the DappLooker SDK, follow these steps:

1. Install the SDK:

npm install @dapp-sdk/analytics-dapplooker

2. Generate an API key:

  • Create an account on the DappLooker website.
  • After signing up, navigate to the API keys page. img.png
  • Click on + API Key. img.png
  • Provide a name for your API key and click on Generate Key. img.png
  • Copy your API key for future use. img.png

3. Get Your Chart UUID

  • Visit the DappLooker Analytics Website
  • Create a new Chart or Open a Existing Created Chart ChartImage.png
  • Click on the API Button img.png
  • Get the UUID of your chart from by clicking on copy icon of Copy Chart UUID. img.png

4. Import the SDK

Once you have installed the SDK, import it into your project. With the imported SDK, create an instance of the DappLookerChartsAPI and make API calls using the API key and chart UUID obtained in the previous steps.

Examples

Here's an example of how you can use the DappLooker SDK:

//Javascript
const DLAnalytics = require("@dapp-sdk/analytics-dapplooker")

const getChartData = async () => {
    let chartUUID = ""; // Replace it with chart UUID you are working with
    let apiKey = ""; // Replace it with your API key
    let outputFormat = 'json'
    let baseConfig = {
      apiKey: apiKey,
      env: "dev"
    }
    let dappLookerSDK = new DLAnalytics.DLAnalytics(baseConfig);
    let response = await dappLookerSDK.getChartData(chartUUID, outputFormat);
    console.log("Chart API Data: ", JSON.stringify(response));
};

getChartData();


> Output (Without outputFormat):
/*{
  "rows": [["2023-02-26T00:00:00Z"]], // This will contain data of all rows in list of list format
  "cols": [{                          // This will contain details of each column
      "description": null,
      "semantic_type": null,
      "table_id": 872
    }],
  "insights": [{ "previous-value": 9}],
  "results_timezone": "GMT"
}*/


> Output (With outputFormat as json):
/*
In JSON format we will get result with list of objects with key as column name and value as column's row value
[
{"Day Timestamp":"2023-02-26","Sum of Attestation Requested Count":3.0,"Sum of Attestation Completed Count":0.0,"Success Percentage":0.0,"Failure Percentage":100.0},
{"Day Timestamp":"2023-03-05","Sum of Attestation Requested Count":16.0,"Sum of Attestation Completed Count":2.0,"Success Percentage":12.5,"Failure Percentage":87.5},
{"Day Timestamp":"2023-05-14","Sum of Attestation Requested Count":3.0,"Sum of Attestation Completed Count":0.0,"Success Percentage":0.0,"Failure Percentage":100.0}
]*/

The @dapp-sdk/analytics-dapplooker also provides TypeScript support for developers who prefer type-checking and enhanced code editor features.

//Typescript
const DLAnalytics = require("@dapp-sdk/analytics-dapplooker")

const getChartData = async () => {
    let chartUUID = ""; // Replace it with chart UUID you are working with
    let apiKey = ""; // Replace it with your API key
    let outputFormat = 'json'
    let baseConfig = {
      apiKey: apiKey,
      env: "dev"
    }
    let dappLookerSDK = new DLAnalytics.DLAnalytics(baseConfig);
    let response = await dappLookerSDK.getChartData(chartUUID, outputFormat);
    console.log("Chart API Data: ", JSON.stringify(response));
};

getChartData();

> Output (Without outputFormat):
/*{
  "rows": [["2023-02-26T00:00:00Z"]],
  "cols": [{
      "description": null,
      "semantic_type": null,
      "table_id": 872
    }],
  "insights": [{ "previous-value": 9}],
  "results_timezone": "GMT"
}*/


> Output ((With outputFormat as json):
/*[
{"Day Timestamp":"2023-02-26","Sum of Attestation Requested Count":3.0,"Sum of Attestation Completed Count":0.0,"Success Percentage":0.0,"Failure Percentage":100.0},
{"Day Timestamp":"2023-03-05","Sum of Attestation Requested Count":16.0,"Sum of Attestation Completed Count":2.0,"Success Percentage":12.5,"Failure Percentage":87.5},
{"Day Timestamp":"2023-05-14","Sum of Attestation Requested Count":3.0,"Sum of Attestation Completed Count":0.0,"Success Percentage":0.0,"Failure Percentage":100.0}
]*/

By integrating the @dapp-sdk/analytics-dapplooker into your Dapp, you can easily access and utilize the most reliable and comprehensive blockchain data in the Web3 environment. Start exploring the possibilities and enhancing your decentralized applications with DappLooker SDK today!

Resources

  • Website To checkout our Product.
  • Docs For comprehensive documentation.
  • Medium To learn more about our partners, new launches, etc.
  • GitHub for source code, project board, issues, and pull requests.
  • Youtube Subscribe to our YouTube channel for video tutorials, demos, and informative content.

Contributing

We invite you to become a valued member of the DappLooker community, an open-source project committed to transparency in our development process. We appreciate any contributions you can make, whether it's helping us identify and fix bugs, suggesting new features, improving our documentation, or spreading the word about DappLooker.

If you come across any errors or issues while using DappLooker, please take a moment to create a bug report. Your feedback is invaluable in improving the reliability. We also value the importance of comprehensive documentation. If you find any gaps or areas that need improvement in our documentation, please don't hesitate, Your suggestions will enable us to provide better resources for our users.

If you're unsure where to begin or need assistance, we invite you to join our Discord community. We'll be more than happy to help you get started on your journey with DappLooker.

Social Links

Follow us to stay updated with the latest news and updates!

Discord | Twitter | Telegram | Linkedin