mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-19 14:05:23 +00:00
Commit from GitHub Actions (Publish APIs & Clients)
This commit is contained in:
15
examples/sunnah/collections/go/listAvailableCollections.go
Executable file
15
examples/sunnah/collections/go/listAvailableCollections.go
Executable file
@@ -0,0 +1,15 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/sunnah"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Get a list of available collections. A collection is
|
||||
// a compilation of hadiths collected and written by an author.
|
||||
func ListAvailableCollections() {
|
||||
sunnahService := sunnah.NewSunnahService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := sunnahService.Collections(&sunnah.CollectionsRequest{})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
Reference in New Issue
Block a user