Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsch committed Mar 20, 2016
1 parent 4b64050 commit 64c6b97
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,39 @@ To install the package run `go get github.com/tehjojo/go-newznab`
To use it in your application, import `github.com/tehjojo/go-newznab/newznab`

## Library Usage

Initialize a client:
```
client := newznab.New("http://my-usenet-indexer/api", "my-api-key", false)
results, _ := client.SearchWithTVRage(newznab.CategoryTVHD, 35048, 3, 1)
```

Search using a tvrage id:
```
categories := []int{
newznab.CategoryTVHD,
newznab.CategoryTVSD,
}
results, _ := client.SearchWithTVRage(categories, 35048, 3, 1)
```

Search using an imdb id:
```
categories := []int{
newznab.CategoryMovieHD,
newznab.CategoryMovieBluRay,
}
results, _ := client.SearchWithIMDB(categories, "0364569")
```

Search using a name and set of categories:
```
results, _ := client.SearchWithQueries(categories, "Oldboy", "movie")
```

Get latest releases for set of categories:
```
results, _ := client.SearchWithQuery(categories, "", "movie")
```

## Contributing
Expand Down

0 comments on commit 64c6b97

Please sign in to comment.