Skip to content
Open
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 go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/linuxfreak003/roku
module github.com/WIZARDISHUNGRY/roku

go 1.14

Expand Down
11 changes: 8 additions & 3 deletions remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ func (r *Remote) ActiveApp() (*App, error) {

// Launch will launch a given App
func (r *Remote) Launch(app *App) error {
return r.launch(app.Id)
return r.launch(app.Id, nil)
}

// LaunchWithValues will launch a given App with exta arguments
func (r *Remote) LaunchWithValues(app *App, values url.Values) error {
return r.launch(app.Id, values)
}

// Install will install the given app.
Expand Down Expand Up @@ -251,8 +256,8 @@ func (r *Remote) install(appID string) error {
}

// helper method for hitting the `launch` endpoint
func (r *Remote) launch(appID string) error {
URL := fmt.Sprintf("http://%s/launch/%s", r.Addr, appID)
func (r *Remote) launch(appID string, values url.Values) error {
URL := fmt.Sprintf("http://%s/launch/%s?%s", r.Addr, appID, values.Encode())

resp, err := http.Post(URL, "", nil)
if err != nil {
Expand Down