0.1.0 • Published 3 years ago

@vantage-sh/vantage-client v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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 support@vantage.sh 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

ClassMethodHTTP requestDescription
Vantage.CostsApigetCostsGET /v1/reports/{report_id}/costs
Vantage.CostsApigetReportGET /v1/reports/{report_id}
Vantage.CostsApigetReportsGET /v1/reports
Vantage.PingApipingGET /v1/ping
Vantage.PricesApigetPriceGET /v1/products/{product_id}/prices/{id}
Vantage.PricesApigetPricesGET /v1/products/{product_id}/prices
Vantage.PricesApigetProductGET /v1/products/{id}
Vantage.PricesApigetProductsGET /v1/products
Vantage.PricesApigetProvidersGET /v1/providers
Vantage.PricesApigetServicesGET /v1/services

Documentation for Models

Documentation for Authorization

oauth2

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

3 years ago

0.1.0-beta3

3 years ago

0.1.0-beta2

3 years ago

0.1.0-beta1

3 years ago

0.1.0-beta7

3 years ago

0.1.0-beta6

3 years ago

0.1.0-beta5

3 years ago

0.1.0-beta4

3 years ago

0.0.1-beta7

3 years ago

0.0.1-beta6

3 years ago

0.0.1-beta5

3 years ago

0.0.1-beta4

3 years ago

0.0.1-beta3

3 years ago

0.0.1-beta2

3 years ago

0.0.1

3 years ago

0.0.1-beta1

3 years ago