-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any documentation on how to make a request? #86
Comments
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
It's definitely a bit confusing, since our OpenAPI spec isn't always perfectly normalized and we have a whole bunch of models to use, and there's a lot of Kiota helpers generated as well. Here's the approach I've found helpful (and maybe we should add this to the docs somewhere):
client, err := pkg.NewApiClient(
pkg.WithUserAgent("my-user-agent"),
pkg.WithRequestTimeout(5*time.Second),
pkg.WithBaseUrl("https://api.github.com"),
pkg.WithTokenAuthentication(os.Getenv("GITHUB_TOKEN")),
)
if err != nil {
log.Fatalf("error creating client: %v", err)
}
releases, err := client.Repos().ByOwnerId("octokit").ByRepoId("go-sdk").Releases().Get(context.Background(), nil)
if err != nil {
log.Fatalf("error getting releases: %v", err)
}
log.Printf("Releases:\n")
for _, release := range releases {
log.Printf("Tag: %v\n", *release.GetTagName())
log.Printf("Notes: %v\n", *release.GetBody())
} I hope that helps! |
Thank you very much for your help, it solved my problem. |
Hello, I want to get the release list of a repo. Is there any relevant document?
Here is my code:
Here is the error message:
How should I modify it?
The text was updated successfully, but these errors were encountered: