Skip to content

Template repo which shows how to generate Palmetto Energy and Finance API clients and use it in a TypeScript project

License

Notifications You must be signed in to change notification settings

palmetto/palmetto-example-ts-energy-and-finance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Palmetto logo

Palmetto Energy and Finance API TypeScript Sample

Links

Summary

This project is a sample of how to use the Palmetto Energy and Finance API in TypeScript. The goal of this project is to quickly bootstrap a developer with the following:

  1. How to programmatically generate a Typescript library to make calling Palmetto APIs simple and easy.
  2. How to setup authentication for Palmetto APIs
  3. How to call and get the response from some of the key APIs

Getting Started

In order to get started and make your first succesfull API calls you will need to do the following:

  1. Clone this repo (or chose Use this template to start a new repo from it)

image

  1. Run npm install to install all the packages
  2. Run npm run generate to generate the Palmetto Energy and Finance client SDKs
  3. Create a .env file in the root of the project and add the following variables:
PALMETTO_ENERGY_ACCOUNT_EMAIL=YOUR_SERVICE_ACCOUNT_EMAIL@DOMAIN.COM
PALMETTO_ENERGY_ACCOUNT_PASSWORD=YOUR_SERVICE_ACCOUNT_PASSWORD
PALMETTO_FINANCE_ACCOUNT_EMAIL=YOUR_SERVICE_ACCOUNT_EMAIL@DOMAIN.COM
PALMETTO_FINANCE_ACCOUNT_PASSWORD=YOUR_SERVICE_ACCOUNT_PASSWORD

There is a sample .env file called .env.example that you can rename to .env and put your values in. If you use the same account for both Palmetto Finance and Palmetto Energy you can use the same email and password for both.

‼️ If you do not have a service account please contact developer-support@palmetto.com

  1. Run the samples by running npm run start

The examples shown in the sample are not meant to be exhaustive but a good starting point. For more information please refer to https://docs.palmetto.com

About

Template repo which shows how to generate Palmetto Energy and Finance API clients and use it in a TypeScript project

Topics

Resources

License

Stars

Watchers

Forks