Skip to content

Latest commit

 

History

History
91 lines (64 loc) · 2.61 KB

README.md

File metadata and controls

91 lines (64 loc) · 2.61 KB

🛰️ ISS Current Location

Go Reference Official Documentation OpenAPI Go Report Card Code Coverage API Health License: MIT

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.