Skip to content

Instantly share code, notes, and snippets.

@arket
Created January 26, 2015 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arket/c90b11646895b173a814 to your computer and use it in GitHub Desktop.
Save arket/c90b11646895b173a814 to your computer and use it in GitHub Desktop.
はてブエントリー情報取得API
var frisby = require('frisby');
var HOST = 'b.hatena.ne.jp';
var searchUrl = 'http://imas-cinderella.com';
frisby.create('はてブエントリー情報取得API')
.get('http://' + HOST + '/entry/jsonlite/?url=' + searchUrl)
.expectHeaderContains('content-type', 'application/json')
.expectStatus(200)
.expectJSONTypes({
count: String,
bookmarks: [
{
timestamp: String,
comment: String,
user: String,
tags: Array,
}
]
})
.inspectJSON()
.toss();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment