-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds more examples and documentation (#83)
* rename examples to _examples will exclude it from appearing in a vendored module * add shutdown example * move test.sh into script dir * generate a request mapping into the docs * do some wacky markdown preprocessing lol anything to avoid updating documentation!! * replace the version in the readme too * find the library version from the runtime deps of whatever tool uses goobs one less thing to update on new releases! * only print versions in basic example * ensure obs is running for readme snippet update * be explicit about latest in script/test.sh * nit: test workflow step needed a name * fix update-readme-snippets.sh * basic example needs to use go modules to find correct library version * try something else to find candidate library version * internal: sample module to test version discovery from deps * fix snippet when it's it's the last line * todo write more usage docs * godocs * try to cleanly disconnect but if err force close * add more detailed usage docs * docs --------- Co-authored-by: Andrey Kaipov <andreykaipov@users.noreply.github.com>
- Loading branch information
1 parent
c17eaa7
commit b8f04e9
Showing
25 changed files
with
683 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"log" | ||
|
||
"github.com/andreykaipov/goobs" | ||
"github.com/andreykaipov/goobs/api/requests/general" | ||
) | ||
|
||
func main() { | ||
client, err := goobs.New("localhost:4455", goobs.WithPassword("goodpassword")) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
defer client.Disconnect() | ||
|
||
// this assumes you have the obs-shutdown-plugin installed | ||
// see https://github.com/norihiro/obs-shutdown-plugin | ||
params := general.NewCallVendorRequestParams(). | ||
WithVendorName("obs-shutdown-plugin"). | ||
WithRequestType("shutdown"). | ||
WithRequestData(map[string]interface{}{ | ||
"reason": "cleaning up", | ||
"support_url": "https://github.com/norihiro/obs-shutdown-plugin/issues", | ||
"force": true, | ||
}) | ||
resp, err := client.General.CallVendorRequest(params) | ||
fmt.Println(resp, err) | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.