Skip to content

Commit

Permalink
improving readme file example
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleider committed Apr 30, 2018
1 parent 2ad44d0 commit 294e862
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,41 @@ import * as podcastSearch from 'podcast-search';
var podcastSearch = require('podcast-search');
```

### UMD in Browser

```
<!-- to import non-minified version -->
<script src="podcast-search.umd.js"></script>
<!-- to import minified version -->
<script src="podcast-search.umd.min.js"></script>
```

## Methods

Follow the methods that the library provides.

### search(query)

Search for podcasts with provided query.

#### Arguments

| Argument | Type | Options |
| ----------- | ------ | -------------- |
| query | string | 'Search query' |

#### Return
A promise object containing a list os podcasts.

#### Example
```
podcastSearch.search('nerdcast')
.then(data => {
//do what you want with the data
})
```

## License

The MIT License (MIT)
Expand Down

0 comments on commit 294e862

Please sign in to comment.