Skip to content

Commit

Permalink
docs: created user docs (close #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyTheTank committed Jan 2, 2016
1 parent 24c85c4 commit 23ca244
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 11 deletions.
82 changes: 75 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,77 @@
# apiNG-plugin-rss
RSS Plugin for [apiNG](https://github.com/JohnnyTheTank/apiNG)
[logo]: http://aping.io/logo/320/aping-plugin.png "apiNG Plugin"
![apiNG][logo]

## supported apiNG models
- **`social`**
- **`native`** (pure RSS)
**_apiNG-plugin-rss_** is a [RSS](http://cyber.law.harvard.edu/rss/rss.html) plugin for [**apiNG**](https://github.com/JohnnyTheTank/apiNG).

# Information
* **Supported apiNG models: `social`, `native` (RSS)**
* Used RSS->JSON parse service: `http://ajax.googleapis.com/ajax/services/feed/load`

# Documentation
I. INSTALLATION
II. USAGE

## I. INSTALLATION
a) Get files
b) Include files
c) Add dependencies
d) Add the plugin

### a) Get files
You can choose your preferred method of installation:

* Via bower: `bower install apiNG-plugin-rss --save`
* Download from github: [apiNG-plugin-rss.zip](https://github.com/JohnnyTheTank/apiNG-plugin-rss/zipball/master)

### b) Include files
Include `apiNG-plugin-rss.min.js` in your apiNG application
```html
<script src="bower_components/apiNG-plugin-rss/dist/apiNG-plugin-rss.min.js"></script>
```

### c) Add dependencies
Add the module `jtt_aping_rss` as a dependency to your app module:
```js
var app = angular.module('app', ['jtt_aping', 'jtt_aping_rss']);
```

### d) Add the plugin
Add the plugin's directive `aping-rss="[]"` to your apiNG directive and configure your requests (_**II. USAGE**_)
```html
<aping
template-url="templates/social.html"
model="social"
items="20"
aping-rss="[{'path':'http://blog.hackerearth.com/feed'}]">
</aping>
```

## II. USAGE
a) Models
b) Requests

### a) Models
Supported apiNG models

| model | content |
|----------|---------|
| `social` | **RSS feed** |
| `native` (RSS) | **RSS feed** |


### b) Requests
Every **apiNG plugin** expects an array of **requests** as html attribute.

#### Requests by URL
| parameter | sample | description | optional |
|----------|---------|---------|---------|
| **`path`** | `http://blog.hackerearth.com/feed` | RSS feed url | no |
| **`items`** | `15` | Items per request (`0`-`n`) | yes |

Sample requests:
* `[{'path':'http://blog.hackerearth.com/feed'}, {'path':'http://www.magazin.dtv.de/index.php/feed/'}]`
* `[{'page':'http://rss.nytimes.com/services/xml/rss/nyt/Science.xml', 'items':25}]`

# Licence
MIT

## usage
full documentation coming soon ...
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"authors": [
"Jonathan Hornung <jonathan.hornung@gmail.com>"
],
"version": "0.1.0",
"version": "0.6.0",
"description": "rss plugin for apiNG",
"main": "dist/apiNG-plugin-rss.min.js",
"moduleType": [],
Expand Down
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
items="5"
order-by="caption"
order-reverse="false"
aping-rss="[{'path':'http://www.magazin.dtv.de/index.php/feed/'}]">
aping-rss="[{'path':'http://rss.nytimes.com/services/xml/rss/nyt/Science.xml'}]">
</aping>
<hr>
<aping
Expand Down
2 changes: 1 addition & 1 deletion dist/aping-plugin-rss.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aping-plugin-rss",
"version": "0.1.0",
"version": "0.6.0",
"description": "RSS plugin for apiNG",
"main": "Gruntfile.js",
"scripts": {
Expand Down

0 comments on commit 23ca244

Please sign in to comment.