https://github.com/xissy/node-hanrss
A node.js module for getting blog lists from hanrss
https://github.com/xissy/node-hanrss
Last synced: about 1 year ago
JSON representation
A node.js module for getting blog lists from hanrss
- Host: GitHub
- URL: https://github.com/xissy/node-hanrss
- Owner: xissy
- Created: 2013-06-26T00:17:51.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-07-14T01:56:29.000Z (almost 13 years ago)
- Last Synced: 2025-03-12T20:36:37.924Z (over 1 year ago)
- Language: CoffeeScript
- Homepage:
- Size: 143 KB
- Stars: 7
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-hanrss
A node.js module for getting blog lists from [hanrss](http://www.hanrss)
[](https://travis-ci.org/xissy/node-hanrss)
## Installation
Via [npm](https://npmjs.org):
$ npm install hanrss
## Usage
### Load in the module
```javascript
var hanrss = require('hanrss');
```
### Directory class
The `Directory` class loads each blogs' RSS data from
[hanrss directory page](http://www.hanrss.com/directory/).
Currently `Directory` class supports only `popular` and `precent` types.
You can retrieve blog RSS data by type and page number. If you want to
get all pages' blog data then just use `findByType(...)` function instead.
```javascript
var Directory = hanrss.Directory;
Directory.findByTypeAndPageNo('popular', 0, function(err, blogs) {
...
});
Directory.findByType('recent', function(err, blogs) {
...
});
```
blogs object is an array which has blog info. blog info consists of:
* title (string)
* description (string)
* subscriberCount (number)
* url (string)
* rssUrl (string)
## License
Released under the MIT License
Copyright (c) 2013 Taeho Kim
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.