iss-location

module
v0.0.0-...-5cd182a Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT

README

🛰️ ISS Current Location

Go Reference Official Documentation OpenAPI Go Report Card Code Coverage API Health

Provides the current location of the International Space Station (including latitude, longitude, and timestamp) and a list of people currently in space. Users are advised to poll the API no more than once every 5 seconds.

Installation

To install the library, use the following command:

go get github.com/go-api-libs/iss-location/pkg/isslocation

Usage

Example 1: Get the current location of the International Space Station
package main

import (
	"context"

	"github.com/go-api-libs/iss-location/pkg/isslocation"
)

func main() {
	c, err := isslocation.NewClient()
	if err != nil {
		panic(err)
	}

	ctx := context.Background()
	issLocation, err := c.GetIssLocation(ctx)
	if err != nil {
		panic(err)
	}

	// Use issLocation object
}

Example 2: Get a list of astronauts currently in space
package main

import (
	"context"

	"github.com/go-api-libs/iss-location/pkg/isslocation"
)

func main() {
	c, err := isslocation.NewClient()
	if err != nil {
		panic(err)
	}

	ctx := context.Background()
	peopleInSpace, err := c.GetPeopleInSpace(ctx)
	if err != nil {
		panic(err)
	}

	// Use peopleInSpace object
}

Additional Information

Contributing

If you have any contributions to make, please submit a pull request or open an issue on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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