Mosque Go SDK
A Go client for the Mosque API.
Installation
go get github.com/bytheitc/mosques/sdks/goUsage
package main
import (
"fmt"
"github.com/bytheitc/mosques/sdks/go"
)
func main() {
client := mosque.NewClient("your-api-key")
// Get Masjids
masjids, err := client.GetMasjids("London", "UK")
if err != nil {
panic(err)
}
for _, m := range masjids {
fmt.Printf("Masjid: %s\n", m.Name)
}
// Get Prayer Times
times, err := client.GetPrayerTimes("1")
if err != nil {
panic(err)
}
fmt.Printf("Fajr: %s\n", times.Fajr)
}Last updated on