Skip to content

Repository files navigation

forecastapi-sdk

ForecastAPI - JavaScript client for forecastapi-sdk Time series forecasting service with multiple algorithms and automatic method selection This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 2.2.0
  • Package version: 2.2.0
  • Generator version: 7.16.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

npm install forecastapi-sdk --save

Local development

To build and use the library from a local checkout of this repository instead:

npm install
npm run build

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

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

var ForecastAPI = require('forecastapi-sdk');

var defaultClient = ForecastAPI.ApiClient.instance;
// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix['Authorization'] = "Token"

var api = new ForecastAPI.AnalysisApi()
var forecastRequest = new ForecastAPI.ForecastRequest(); // {ForecastRequest} 
api.analyzeTimeSeries(forecastRequest).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://forecastapi.com

Class Method HTTP request Description
ForecastAPI.AnalysisApi analyzeTimeSeries POST /v2/analyze Analyze time series data without generating forecast
ForecastAPI.AnomalyDetectionApi detectAnomalies POST /v2/detect-anomalies Detect anomalies in time series data
ForecastAPI.BatchForecastingApi createBatchForecast POST /v2/batch/forecast Submit a batch of series for forecasting
ForecastAPI.BatchForecastingApi getBatchForecast GET /v2/batch/forecast/{batch_id} Poll a batch forecast for status and results
ForecastAPI.BatchForecastingApi presignBatchForecast POST /v2/batch/forecast/presign Get a presigned URL for a file-based batch upload
ForecastAPI.ForecastingApi createForecast POST /v2/forecast Generate forecast for time series data
ForecastAPI.GroupedForecastingApi createGroupedForecast POST /v2/forecast/grouped Submit a grouped (hierarchical) forecast with reconciliation
ForecastAPI.GroupedForecastingApi getGroupedForecast GET /v2/forecast/grouped/{grouped_forecast_id} Poll a grouped forecast for status and results
ForecastAPI.HealthApi getApiRoot GET /v2 API root endpoint
ForecastAPI.HealthApi healthCheck GET /v2/health Health check endpoint
ForecastAPI.InventoryPlanningApi createInventoryPlan POST /v2/inventory-planning Generate comprehensive inventory planning recommendations
ForecastAPI.ProductInsightsApi createBatchProductInsights POST /v2/batch/product-insights Submit a batch of products for insights analysis
ForecastAPI.ProductInsightsApi createProductInsights POST /v2/product-insights Analyze product performance for anomalies, trends and business insights
ForecastAPI.ProductInsightsApi getProductInsightsBatch GET /v2/batch/product-insights/{batch_id} Poll a product insights batch for status and results
ForecastAPI.TrafficForecastingApi createTrafficForecast POST /v2/traffic-forecasting Generate traffic forecasting with infrastructure scaling recommendations

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

apiKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

About

The official ForecastAPI.com JavaScript SDK

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages