FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node-diffbot/example.js at master · perroudsky/node-diffbot · GitHub
perroudsky
/
node-diffbot
Public
forked from
markbao/node-diffbot
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
node-diffbot
/
example.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (22 loc) · 1020 Bytes
Breadcrumbs
node-diffbot
/
example.js
Copy path
File metadata and controls
26 lines (22 loc) · 1020 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var
Diffbot
=
require
(
'diffbot'
)
.
Diffbot
var
diffbot
=
new
Diffbot
(
'd7bde3fafe30213a331b0f0e65d89b0f'
)
;
// your API key here
// regular function
diffbot
.
article
(
{
uri
:
'http://techcrunch.com/2011/09/07/nintendo-gets-sued-over-the-wii/'
}
,
function
(
err
,
response
)
{
console
.
log
(
response
.
title
)
;
console
.
log
(
response
.
text
)
;
if
(
response
.
media
)
console
.
log
(
JSON
.
stringify
(
response
.
media
)
)
;
}
)
;
// and a dash of cayenne... some addins
diffbot
.
article
(
{
uri
:
'http://www.vanityfair.com/business/features/2011/04/jack-dorsey-201104'
,
html
:
true
,
comments
:
true
,
stats
:
true
}
,
function
(
err
,
response
)
{
console
.
log
(
response
.
stats
.
fetchTime
)
;
console
.
log
(
response
.
stats
.
confidence
)
;
console
.
log
(
response
.
html
)
;
}
)
;
// maybe try the frontpage api too
diffbot
.
frontpage
(
{
uri
:
'http://prettyspace.tumblr.com/'
}
,
function
(
err
,
response
)
{
// the frontpage api is weird right now
// the json return isn't really json...
// it looks like xml converted to json
// need to incorporate an xml parser to this
}
)
;
Back
|
FazBrowse Home
|
New Git URL