Skip to content

Commit

Permalink
Updates Examples to Use New Package Names
Browse files Browse the repository at this point in the history
  • Loading branch information
dvonthenen committed Jun 26, 2024
1 parent 6543ebc commit 43b1b20
Show file tree
Hide file tree
Showing 38 changed files with 269 additions and 631 deletions.
2 changes: 1 addition & 1 deletion examples/manage/balances/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"

api "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/rest"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/manage"
)

func main() {
Expand Down
121 changes: 0 additions & 121 deletions examples/manage/invitations-new-RENAME/main.go

This file was deleted.

2 changes: 1 addition & 1 deletion examples/manage/invitations/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

api "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1"
interfaces "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1/interfaces"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/rest"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/manage"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/manage/keys/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

api "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1"
interfaces "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1/interfaces"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/rest"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/manage"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/manage/members/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"

api "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/rest"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/manage"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/manage/projects/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

api "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1"
interfaces "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1/interfaces"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/rest"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/manage"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/manage/scopes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

api "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1"
interfaces "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1/interfaces"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/rest"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/manage"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/manage/usage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

api "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1"
interfaces "github.com/deepgram/deepgram-go-sdk/pkg/api/manage/v1/interfaces"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/rest"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/manage"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions examples/speech-to-text/rest/callback/callback/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (

prettyjson "github.com/hokaccha/go-prettyjson"

prerecorded "github.com/deepgram/deepgram-go-sdk/pkg/api/prerecorded/v1"
api "github.com/deepgram/deepgram-go-sdk/pkg/api/listen/v1/rest"
interfaces "github.com/deepgram/deepgram-go-sdk/pkg/client/interfaces"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/prerecorded"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/listen"
)

const (
Expand All @@ -30,8 +30,8 @@ func main() {
ctx := context.Background()

//client
c := client.NewWithDefaults()
dg := prerecorded.New(c)
c := client.NewRESTWithDefaults()
dg := api.New(c)

// send stream
res, err := dg.FromURL(
Expand Down
2 changes: 1 addition & 1 deletion examples/speech-to-text/rest/callback/endpoint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/gin-gonic/gin"
prettyjson "github.com/hokaccha/go-prettyjson"

interfaces "github.com/deepgram/deepgram-go-sdk/pkg/api/prerecorded/v1/interfaces"
interfaces "github.com/deepgram/deepgram-go-sdk/pkg/api/listen/v1/rest/interfaces"
)

type SampleProxy struct {
Expand Down
Binary file not shown.
102 changes: 0 additions & 102 deletions examples/speech-to-text/rest/file-new-RENAME/main.go

This file was deleted.

8 changes: 4 additions & 4 deletions examples/speech-to-text/rest/file/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (

prettyjson "github.com/hokaccha/go-prettyjson"

prerecorded "github.com/deepgram/deepgram-go-sdk/pkg/api/prerecorded/v1" //lint:ignore
api "github.com/deepgram/deepgram-go-sdk/pkg/api/listen/v1/rest"
interfaces "github.com/deepgram/deepgram-go-sdk/pkg/client/interfaces"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/prerecorded" //lint:ignore
client "github.com/deepgram/deepgram-go-sdk/pkg/client/listen"
)

const (
Expand All @@ -41,10 +41,10 @@ func main() {
}

// create a Deepgram client
c := client.New("", &interfaces.ClientOptions{
c := client.NewREST("", &interfaces.ClientOptions{
Host: "https://api.deepgram.com",
})
dg := prerecorded.New(c)
dg := api.New(c)

// example on how to send a custom header
// need to import (
Expand Down
8 changes: 4 additions & 4 deletions examples/speech-to-text/rest/intent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (

prettyjson "github.com/hokaccha/go-prettyjson"

prerecorded "github.com/deepgram/deepgram-go-sdk/pkg/api/prerecorded/v1" //lint:ignore
api "github.com/deepgram/deepgram-go-sdk/pkg/api/listen/v1/rest"
interfaces "github.com/deepgram/deepgram-go-sdk/pkg/client/interfaces"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/prerecorded" //lint:ignore
client "github.com/deepgram/deepgram-go-sdk/pkg/client/listen"
)

const (
Expand All @@ -40,8 +40,8 @@ func main() {
}

// create a Deepgram client
c := client.NewWithDefaults()
dg := prerecorded.New(c)
c := client.NewRESTWithDefaults()
dg := api.New(c)

// send/process file to Deepgram
res, err := dg.FromFile(ctx, filePath, options)
Expand Down
8 changes: 4 additions & 4 deletions examples/speech-to-text/rest/sentiment/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (

prettyjson "github.com/hokaccha/go-prettyjson"

prerecorded "github.com/deepgram/deepgram-go-sdk/pkg/api/prerecorded/v1" //lint:ignore
api "github.com/deepgram/deepgram-go-sdk/pkg/api/listen/v1/rest"
interfaces "github.com/deepgram/deepgram-go-sdk/pkg/client/interfaces"
client "github.com/deepgram/deepgram-go-sdk/pkg/client/prerecorded" //lint:ignore
client "github.com/deepgram/deepgram-go-sdk/pkg/client/listen"
)

const (
Expand All @@ -40,8 +40,8 @@ func main() {
}

// create a Deepgram client
c := client.NewWithDefaults()
dg := prerecorded.New(c)
c := client.NewRESTWithDefaults()
dg := api.New(c)

// send/process file to Deepgram
res, err := dg.FromFile(ctx, filePath, options)
Expand Down
Loading

0 comments on commit 43b1b20

Please sign in to comment.