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

@vantage-sh/vantage-client

v0.1.0

Published

Vantage API Client

Downloads

1

Readme

Build Status

Vantage Javascript Client

Vantage Picture

Vantage is a cloud cost transparency platform. This is the official Ruby client for the Vantage API. You can use the API to get EC2 instance price and product information through a few simple-to-use API calls. The data offered through this API is heavily inspired from data avaiable from ec2instances.info. The feedback we get from users is that this API is significantly easier than learning and using AWS Pricing APIs. We have plans to expand the data available through this API in the future.

Need Help?

Feel free to join us in our community Slack in the #api channel. We're happy to chat and help. You're also welcome to email [email protected] or ping @JoinVantage on Twitter and we're happy to give assistance. Lastly, we monitor issues on this repo if you have any feature requests or issues.

Installation

The easiest way to get going is to install the client through RubyGems:

npm i @vantage-sh/vantage-client --save

Generate a Free API Token

The Vantage API is provided completely for free but requires an API token to use. To generate a free API token, follow these steps:

  • Head to http://vantage.sh/
  • Register a free account and confirm your email
  • When you're asked "What would you like to do first?" click "Access Cloud Pricing API"
  • Create an API token from the account profile page and you're all set

You'll only need to do this once and you can use your API token for all usage going forward.

Client

Vantage - JavaScript client for vantage Vantage API This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 0.1.0-beta7
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit https://www.vantage.sh

Getting Started

Please follow the installation instruction and execute the following JS code:

var Vantage = require('vantage');

var defaultClient = Vantage.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = "YOUR ACCESS TOKEN"

var api = new Vantage.CostsApi()

var reportId = "reportId_example"; // {String} 

var opts = { 
  'startDate': "startDate_example", // {String} Query costs by the first date you would like to filter from. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
  'endDate': "endDate_example", // {String} Query costs by the last date you would like to filter to. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
  'page': 2, // {Number} The page of results to return.
  'limit': 500 // {Number} The amount of results to return. The maximum is 1000
};
api.getCosts(reportId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://api.vantage.sh

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- Vantage.CostsApi | getCosts | GET /v1/reports/{report_id}/costs | Vantage.CostsApi | getReport | GET /v1/reports/{report_id} | Vantage.CostsApi | getReports | GET /v1/reports | Vantage.PingApi | ping | GET /v1/ping | Vantage.PricesApi | getPrice | GET /v1/products/{product_id}/prices/{id} | Vantage.PricesApi | getPrices | GET /v1/products/{product_id}/prices | Vantage.PricesApi | getProduct | GET /v1/products/{id} | Vantage.PricesApi | getProducts | GET /v1/products | Vantage.PricesApi | getProviders | GET /v1/providers | Vantage.PricesApi | getServices | GET /v1/services |

Documentation for Models

Documentation for Authorization

oauth2

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
    • read: Grants read access