Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
Signed-off-by: Bashorun97 <[email protected]>
  • Loading branch information
Bashorun97 committed Jun 15, 2024
1 parent 2e2a0f7 commit 640f62f
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ import (
"github.com/gandalf-network/gandalf-sdk-go/eyeofsauron/generated"
)

func getActivity() {
func main() {
// initialize eyeofsauron object
...


// Get activity
response, err := eye.GetActivity(
context.Background(),
Expand Down Expand Up @@ -128,7 +132,10 @@ import (
"github.com/gandalf-network/gandalf-sdk-go/eyeofsauron/generated"
)

func lookupActivity() {
func main() {
// initialize eyeofsauron object
...

// Lookup activity
response, err := eye.LookupActivity(
context.Background(),
Expand Down Expand Up @@ -178,6 +185,9 @@ func printJSON(v interface{}) {
### Get Traits
```go
func main() {
// initialize eyeofsauron object
...

response, err := eye.GetTraits(context.Background(), "MY_DATA_KEY", generated.SourceNetflix, []generated.TraitLabel{generated.TraitLabelPlan})
if err != nil {
log.Fatalf("failed to get traits: %s", err)
Expand All @@ -189,7 +199,10 @@ func main() {

### Lookup Traits
```go
func lookupTraits() {
func main() {
// initialize eyeofsauron object
...

traitID, err := uuid.Parse("MY_TRAIT_ID")
if err != nil {
log.Fatalf("failed to parse string to uuid")
Expand Down

0 comments on commit 640f62f

Please sign in to comment.