Skip to content

Commit

Permalink
Updated readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
imba3r committed May 9, 2017
1 parent d5b18f7 commit acd52ba
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ To use it in your application, import `github.com/mrobinsn/go-newznab/newznab`

## Library Usage

Initialize a client:
### Initialize a client:
```
client := newznab.New("http://my-usenet-indexer/api", "my-api-key", 1234, false)
client := newznab.New("http://my-usenet-indexer", "my-api-key", 1234, false)
```
Note the missing `/api` part of the URL. Depending on the called method either `/api` or `/rss` will be appended to the given base URL. A valid user ID is only required for RSS methods.

Search using a tvrage id:
### Search using a tvrage id:
```
categories := []int{
newznab.CategoryTVHD,
Expand All @@ -34,7 +35,7 @@ categories := []int{
results, _ := client.SearchWithTVRage(categories, 35048, 3, 1)
```

Search using an imdb id:
### Search using an imdb id:
```
categories := []int{
newznab.CategoryMovieHD,
Expand All @@ -43,22 +44,22 @@ categories := []int{
results, _ := client.SearchWithIMDB(categories, "0364569")
```

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

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

Load latest releases via RSS:
### Load latest releases via RSS:
```
results, _ := client.LoadRSSFeed(categories, 50)
```

Load latest releases via RSS up to a given NZB id:
### Load latest releases via RSS up to a given NZB id:
```
results, _ := client.LoadRSSFeedUntilNZBID(categories, 50, "nzb-guid", 15)
```
Expand Down

0 comments on commit acd52ba

Please sign in to comment.