diff --git a/README.md b/README.md index 03f3cd4..00ddb94 100644 --- a/README.md +++ b/README.md @@ -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