Skip to content

thedjpetersen/hetzner-sdk-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Hetzner Typescript SDK

Javascript client for interacting with the Hetzner API

Leveraging the OpenAPI definitions to gracefully generate a client on a regular cadence - also generates typescript types for the API
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. API
  4. Usage
  5. License
  6. Contact
  7. Acknowledgments

About The Project

There are currently a few different SDKs for interacting with the Hetzner API, but none of them were staying up to date using the current OpenAPI definition published on the Hetzner website. This project aims to solve that by using the OpenAPI definition to generate a client on a regular cadence.

(back to top)

Getting Started

To get setup we just need to install the library locally and then we can start defining our states and transitions.

Installation

npm install hetzner-sdk-ts

(back to top)

API

I'd like to exhaustively output types and API definitions here or in an accompanying document. The easiest way to look at the API is just to read the documentation and use the corresponding methods that are generated or you can look through the generated output.

Usage

import { OpenAPI, ServersService } from "hetzner-sdk-ts";

// Set the API key - this will apply globally to all requests
OpenAPI.TOKEN = apiKey;

// Get a list of all servers
const { servers } = await ServersService.getServers({});

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

DJ Petersen - @thedjpetersen

Project Link: https://github.com/thedjpetersen/hetzner-sdk-ts

(back to top)

Acknowledgments

(back to top)

About

A Javascript SDK generated from Hetzner's OpenAPI definitions 🗃️

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published