-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add notes api call and artifact upload to CI
- Loading branch information
1 parent
3029860
commit b72bb4d
Showing
5 changed files
with
58 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module ra-code-notes | ||
|
||
go 1.23.0 | ||
|
||
require github.com/joshraphael/go-retroachievements v1.0.0 |
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,2 @@ | ||
github.com/joshraphael/go-retroachievements v1.0.0 h1:Hu1bitG8r9O8AZWx7BfGOyVo9Sga3phxQBq0b8Q/3vQ= | ||
github.com/joshraphael/go-retroachievements v1.0.0/go.mod h1:C+9vQbOqyRJmnFt8XIJ5gwRot+AZS/acnaESp45jtCc= |
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,34 @@ | ||
package main | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"os" | ||
|
||
"github.com/joshraphael/go-retroachievements" | ||
"github.com/joshraphael/go-retroachievements/models" | ||
) | ||
|
||
func main() { | ||
client := retroachievements.New(retroachievements.ClientConfig{ | ||
Host: retroachievements.RetroAchievementHost, | ||
UserAgent: "go-retroachievements/v1.0.0", | ||
}) | ||
notes, err := client.GetCodeNotes(models.GetCodeNotesParameters{ | ||
GameID: 4111, | ||
}) | ||
if err != nil { | ||
os.Exit(1) | ||
fmt.Println("error getting code notes") | ||
return | ||
} | ||
|
||
jsonNotes, err := json.Marshal(notes.CodeNotes) | ||
if err != nil { | ||
os.Exit(1) | ||
fmt.Println("error converting code notes to json") | ||
return | ||
} | ||
|
||
fmt.Println(string(jsonNotes)) | ||
} |
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