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

add Ping to avs #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion avs.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const (
// DefaultClient is the default Client.
var DefaultClient = &Client{
// EndpointURL is the base endpoint URL for the AVS API.
EndpointURL: "https://avs-alexa-na.amazon.com",
EndpointURL: "https://alexa.na.gateway.devices.a2z.com",
}

// CreateDownchannel establishes a persistent connection with AVS and returns a
Expand All @@ -80,6 +80,12 @@ func CreateDownchannel(accessToken string) (<-chan *Message, error) {
return DefaultClient.CreateDownchannel(accessToken)
}

// use Ping to keep downChannel alive
//
// Ping is a wrapper around DefaultClient.Ping.
func Ping(accessToken string) error {
return DefaultClient.Ping(accessToken)
}
// PostEvent will post an event to AVS.
//
// PostEvent is a wrapper around DefaultClient.Do.
Expand Down