Skip to content

iArmanKarimi/Open-Notify-API-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Notify API - Go

Open Nofity API client for Go

Open Notify is an open source project to provide a simple programming interface for some of NASA’s awesome data.

For other languages, see Open Notify API clients

Installation

Examples

Number of People in Space:

ppl, err := GetPeopleInSpace()
fmt.Println("People in space right now:")
for _, v := range ppl.People {
    fmt.Printf("Craft: %s, Name: %s\n", v.Craft, v.Name)
}
fmt.Printf("Number of people in space: %d\n", ppl.Number)

Current Location of the International Space Station:

iss, err := GetISSLocation()
fmt.Println("current location of ISS:")
fmt.Printf("latitude: %f\n", iss.Location.Latitude)
fmt.Printf("longitude: %f\n", iss.Location.Longitude)

References

Open Notify Website

Official API documentation

License

MIT