Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates Examples With New Package Names, Adds Warning, Fix Thread Panic #252

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
dvonthenen marked this conversation as resolved.
Show resolved Hide resolved
)

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"
dvonthenen marked this conversation as resolved.
Show resolved Hide resolved
)

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
Loading