8000 GitHub - matthewjwhite/roku: 👾 Roku External Control API package for Golang
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

matthewjwhite/roku

 
 

Repository files navigation

roku

Roku External Control API package for Golang

Rick Roll the Roku(s)

Rick Roll all roku devices on the network that have YouTube installed.

dQw4w9WgXcQ is the contentID of "Never Gonna Give You Up" on YouTube

package main

import "github.com/picatz/roku"

func main() {
    devices, err := roku.Find(roku.DefaultWaitTime)

    if err != nil {
        panic(err)
    }

    for _, device := range devices {
        apps, err := device.Apps()

        if err != nil {
            panic(err)
        }

        for _, app := range apps {
            if app.ID == roku.YouTubeAppID {
                device.LaunchApp(app.ID, roku.Params{
                    "contentID": "dQw4w9WgXcQ",
                })
            }
        }
    }
}

Where's the remote(s)?

On supported devices, you can make the remote beep.

package main

import "github.com/picatz/roku"

func main() {
    devices, err := roku.Find(roku.DefaultWaitTime)

    if err != nil {
        panic(err)
    }

    for _, device := range devices {
        device.FindRemote()
     }
}

About

👾 Roku External Control API package for Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%
0