-
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 GetDeveloperTicketStats endpoint
- Loading branch information
1 parent
560f3cc
commit befb4e7
Showing
5 changed files
with
176 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
30 changes: 30 additions & 0 deletions
30
examples/ticket/getdeveloperticketstats/getdeveloperticketstats.go
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 @@ | ||
// getdeveloperticketstats | ||
|
||
// Package getdeveloperticketstats provides an example for getting ticket stats for a developer, targeted by that developer's site username. | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/joshraphael/go-retroachievements" | ||
"github.com/joshraphael/go-retroachievements/models" | ||
) | ||
|
||
/* | ||
Test script, add RA_API_KEY to your env and use `go run getdeveloperticketstats.go` | ||
*/ | ||
func main() { | ||
secret := os.Getenv("RA_API_KEY") | ||
|
||
client := retroachievements.NewClient(secret) | ||
|
||
resp, err := client.GetDeveloperTicketStats(models.GetDeveloperTicketStatsParameters{ | ||
Username: "jamiras", | ||
}) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
fmt.Printf("%+v\n", resp) | ||
} |
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