Skip to content

Commit

Permalink
Fix API
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiojr committed Aug 18, 2024
1 parent 6ffe1b4 commit 2da9224
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/omnivore/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"os"
"strings"

"context"

"github.com/rubiojr/omnivore-go"
"github.com/urfave/cli/v2"
)
Expand All @@ -14,9 +16,6 @@ func main() {
app := &cli.App{
Name: "omnivore",
Usage: "Omnivore API client",
Action: func(*cli.Context) error {
return nil
},
Flags: []cli.Flag{},
Commands: []*cli.Command{
{
Expand Down Expand Up @@ -44,7 +43,7 @@ func listSaved(ctx *cli.Context) {
longFormat := ctx.Bool("long")
client := omnivore.NewClient(omnivore.Opts{Token: getAPIToken()})
// https://docs.omnivore.app/using/search.html
a, err := client.Search(omnivore.SearchOpts{Query: "in:all sort:saved"})
a, err := client.Search(context.Background(), omnivore.SearchOpts{Query: "in:all sort:saved"})
if err != nil {
log.Fatalf("Failed to search: %v", err)
}
Expand Down

0 comments on commit 2da9224

Please sign in to comment.