gorotorsoft

package module
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

RotorSoft Go Client

This Go client is designed to interact with the RotorSoft API, providing a convenient way to make requests and manage data. The client supports multiple versions of the API, making it flexible for various use cases.

Table of Contents

Features

  • Multiple API Versions: Supports interaction with all of the RotorSoft API versions.
  • Simple Authentication: Use your username and password for easy access to the API.
  • Custom HTTP Client: Option to provide a custom http.Client for more control over HTTP requests.

Installation

To install the RotorSoft Go client, ensure you have Go installed on your machine. You can download it from golang.org.

  1. Clone the repository:

    go get github.com/Predixxion/gorotorsoft
    
  2. Use Go modules to install dependencies:

    go mod tidy
    
  3. Import the client in your project:

    import "github.com/Predixxion/gorotorsoft"
    

Usage

Here’s an example of how to create a new Client and use it to interact with the RotorSoft API:

package main

import (
    "net/http"
    "fmt"
    "github.com/Predixxion/gorotorsoft"
)

func main() {
    httpClient := &http.Client{}
    url := "https://api.rotorsoft.com" // Replace with actual API URL
    username := "your-username"
    password := "your-password"

    client := NewClient(httpClient, url, username, password)

    // Example usage of the API client
    endpoints := client.V0.GetAllEndPoints()

    fmt.Println("Available endpoints:", endpoints)
}

Contributing

Contributions are welcome! If you would like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Commit your changes.
  4. Open a pull request.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertRotorSoftRawDataToTable

func ConvertRotorSoftRawDataToTable(rawData v0.GetRawDataForPowerUnitsResponse, powerUnitMap map[string]string, dataFieldMap map[string]string) []v0.SensorValueTable

Types

type Client

type Client struct {
	V0 *v0.RotorSoftClient
	V1 *v1.RotorSoftClient
	V2 *v2.RotorSoftClient
	V3 *v3.RotorSoftClient
}

func NewClient

func NewClient(httpClient *http.Client, url, username, password string) *Client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL