Skip to content

Commit

Permalink
bug: fixed auth headers and query params
Browse files Browse the repository at this point in the history
chore: added generated output examples
  • Loading branch information
AlterNayte committed Sep 3, 2024
1 parent 5b7da35 commit d9bd10e
Show file tree
Hide file tree
Showing 7 changed files with 1,271 additions and 30 deletions.
12 changes: 12 additions & 0 deletions example/github/github.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package github

type GithubApi struct {
GetUser func() (*UserInfo, error) `method:"GET" path:"/user" auth:"bearer"`
GetRepositories func() ([]Repository, error) `method:"GET" path:"/user/repos"`
GetCommits func(owner string, repo string, since string) ([]Commit, error) `method:"GET" path:"/repos/{owner}/{repo}/commits" query:"since"`
GetIssues func(owner, repo string) ([]Issue, error) `method:"GET" path:"/repos/{owner}/{repo}/issues"`
GetLanguages func(owner, repo string) (*Language, error) `method:"GET" path:"/repos/{owner}/{repo}/languages"`
GetTraffic func(owner, repo string) (*Traffic, error) `method:"GET" path:"/repos/{repo}/{owner}/traffic/views"`
GetStargazers func(owner, repo string) ([]Stargazer, error) `method:"GET" path:"/repos/{repo}/stargazers"`
GetForks func(owner, repo string) ([]Fork, error) `method:"GET" path:"/repos/{owner}/{repo}/forks"`
}
Loading

0 comments on commit d9bd10e

Please sign in to comment.