Skip to content

Commit

Permalink
Merge pull request #16 from oshribin/add_deps
Browse files Browse the repository at this point in the history
resolves #15
  • Loading branch information
oshribin authored Jul 3, 2017
2 parents da501b9 + f485bc7 commit ff499d3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# facebook-insight-stream
FacebookInsightStream provide stream API, built over node-readable-stream, to read facebook insights
using the facebook Graph API V2.5.
using the facebook Graph API V2.8.
Currently facebook insights api return data per metric, this module joins all the list
to one list by the insight date.

Expand All @@ -15,6 +15,15 @@ Currently support the following insights:
```javascript
var FacebookInsightStream = require( "facebook-insight-stream" );

var options = {
pastdays: "30",
node: "page",
token: "Replace with your facebook access token",
period: "day",
metrics: ["page_views"],
itemList: ["replace with your facebook page id"],
}

var pageStream = new FacebookInsightStream( options )
// return list of insights e.g [ { name: "mypage", views: "10" } ]
.on( "data", console.log )
Expand All @@ -26,12 +35,12 @@ var pageStream = new FacebookInsightStream( options )

### FacebookInsightStream options:

* `pastdays` (string)#number of collected days from today e.g "30"
* `node` (string)#type of insight one of the two ( "app", "page" )
* `token` (string)#valid facebook oAuth token with 'read_insigt' scope
* `period` (string)#the time period to collect according to the relevant api
* `metrics` (array)#list of metrics to collect e.g [ "page_views", "unique_users" ]
* `itemList` (array)#list of pages/apps ids to collect from
* `pastdays` (string-required)#number of collected days from today e.g "30"
* `node` (string-required)#type of insight one of the two ( "app", "page" )
* `token` (string-required)#valid facebook oAuth token with 'read_insigt' scope
* `period` (string-required)#the time period to collect according to the relevant api
* `metrics` (array-required)#list of metrics to collect e.g [ "page_views", "unique_users" ]
* `itemList` (array-required)#list of pages/apps ids to collect from
* `events` (array)#list of events to collect from
* `aggregate` (bool)#value to set if it should aggregate by relevant types
* `breakdowns` (array)#list of breakdowns values to break results
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "facebook-insight-stream",
"version": "1.0.7",
"version": "1.0.8",
"description": "Readable stream for reading facebook insights",
"main": "index.js",
"scripts": {
Expand All @@ -20,7 +20,13 @@
"url": "https://github.com/panoplyio/facebook-insight-stream/issues"
},
"homepage": "https://github.com/panoplyio/facebook-insight-stream#readme",
"dependencies": {
"sugar": "1.4.1",
"extend": "3.0.0",
"request": "2.53.0",
"bluebird": "2.9.32"
},
"devDependencies": {
"mocha": "^2.3.4"
"mocha": "2.3.4"
}
}

0 comments on commit ff499d3

Please sign in to comment.