https://github.com/sapuri/avgle-go
The unofficial Go client for Avgle API
https://github.com/sapuri/avgle-go
avgle go
Last synced: 2 months ago
JSON representation
The unofficial Go client for Avgle API
- Host: GitHub
- URL: https://github.com/sapuri/avgle-go
- Owner: sapuri
- License: apache-2.0
- Created: 2020-03-21T19:57:19.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-10T03:26:28.000Z (almost 5 years ago)
- Last Synced: 2025-02-05T00:44:45.028Z (4 months ago)
- Topics: avgle, go
- Language: Go
- Size: 48.8 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# avgle-go
The unofficial Go client for Avgle APIAPI Reference: https://avgle.github.io/doc/
## Installation
```
go get github.com/sapuri/avgle-go
```## Usage
### Methods
```go
type Client interface {
GetCategories(ctx context.Context) (GetCategoriesResp, error)
GetCollections(ctx context.Context, page, limit string) (GetCollectionsResp, error)
GetVideos(ctx context.Context, page string) (GetVideosResp, error)
SearchVideos(ctx context.Context, query, page string) (SearchVideosResp, error)
SearchJAVs(ctx context.Context, query, page string) (SearchJAVsResp, error)
GetVideoByVID(ctx context.Context, vid string) (GetVideoByVIDResp, error)
}
```### Example
```go
package mainimport (
"context"
"fmt"
"log""github.com/sapuri/avgle-go"
)func main() {
ctx := context.Background()client, err := avgle.NewClient()
if err != nil {
log.Fatal(err)
}result, err := client.SearchVideos(ctx, "三上悠亜", "0")
if err != nil {
log.Fatal(err)
}videos := result.Response.Videos
for _, video := range videos {
fmt.Println(video)
}
}```
## License
[Apache License 2.0](LICENSE)