砂の声

はてなという無名都市を彷徨う旅人の記録。・・・・・・という厨二設定で行う、はてなサービスの不平不満ネタアイデア等書き連ねるブログです。

はてなブックマークのAPIを弄る。

bookmark.hatenastaff.com
このような形ではてなの公式ページが勝手に変わる為、もはやStylyshでは足りないという判断から、はてなブックマークAPIの活用を図る事を検討中。


なお、ブックマーク参照とかするサンプルページとして、
A さんの件について - naoyaのはてなダイアリー
https://twitter.com/neenya00/status/899105175930941440

を利用。

エントリのブクマページ情報取得

はてなブックマークエントリー情報取得API - Hatena Developer Center

ここではjsonliteを使います。

http://b.hatena.ne.jp/entry/jsonlite/http://d.hatena.ne.jp/naoya/20170725/1500942772

{
  "count":2282
  ,"bookmarks":
    [{"timestamp":"2017/08/21 06:47:54","comment":"","user":"mipatamu","tags":[]}
    ,{"timestamp":"2017/08/18 09:03:33","comment":"","user":"caopatbc","tags":[]}
    ,{"timestamp":"2017/08/18 07:04:04","comment":"","user":"mitatabek","tags":[]}
    ,{"timestamp":"2017/08/17 10:01:16","comment":"","user":"uzumaki2283","tags":[]}
    ,{"timestamp":"2017/08/17 08:33:09","comment":"","user":"sakikadoit","tags":["\u306f\u3066\u306a","\u4eba\u751f"]}
    ,{"timestamp":"2017/08/10 10:08:36","comment":"","user":"lleidou","tags":[]}
    ,{"timestamp":"2017/08/10 07:26:39","comment":"","user":"tsumegus","tags":[]}
    ,{"timestamp":"2017/08/09 10:11:36","comment":"","user":"asayoi256","tags":[]}
    ,{"timestamp":"2017/08/09 10:06:29","comment":"","user":"hideeeeeeeeeeeeee","tags":[]}
    ,{"timestamp":"2017/08/09 09:40:31","comment":"","user":"morokato63","tags":["\u306f\u3066\u306a","\u4eba\u751f","\u7537\u5973"]}
    ,{"timestamp":"2017/08/08 10:18:36","comment":"","user":"taxi45","tags":[]}
    :
    :
    ,{"timestamp":"2017/07/25 10:03:24","comment":"\u30aa\u30c3","user":"Lian","tags":["\u30f2\u30c1"]}
    ,{"timestamp":"2017/07/25 09:52:48","comment":"","user":"shonanboy","tags":[]}]
  ,"url":"http://d.hatena.ne.jp/naoya/20170725/1500942772"
  ,"eid":342372615
  ,"title":"A \u3055\u3093\u306e\u4ef6\u306b\u3064\u3044\u3066 - naoya\u306e\u306f\u3066\u306a\u30c0\u30a4\u30a2\u30ea\u30fc"
  ,"screenshot":"http://screenshot.hatena.ne.jp/images/200x150/d/9/d/4/d/958fb92d4e06ee288e5b82df8d3e0927a77.jpg"
  ,"entry_url":"http://b.hatena.ne.jp/entry/d.hatena.ne.jp/naoya/20170725/1500942772"
}||<

[http://b.hatena.ne.jp/entry/jsonlite/https://twitter.com/neenya00/status/899105175930941440]
>||
{"count":2
,"bookmarks":
  [{"timestamp":"2017/08/22 16:48:58","comment":"https://www.gyokuhokan.jp/","user":"houyhnhm","tags":["\u306a\u304a\u306b\u3083\u3093","\u79d2\u901f\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8"]}]
  ,"url":"http://twitter.com/neenya00/status/899105175930941440"
  ,"eid":343803339
  ,"title":"\u306a\u304a\u3084\u3055\u3093\u3078\u3055\u3093\u306e\u30c4\u30a4\u30fc\u30c8: \"\u306a\u304a\u3084\u3055\u3093 \u306a\u304a\u3084\u3055\u3093\u3068\u4f0a\u8c46\u306e\u7389\u5cf0\u9928\u306b\u884c\u3063\u305f\u601d\u3044\u51fa\u3092\u66f8\u3044\u305f\u3089\u3001\u4eca\u671d\u306f\u306a\u304a\u3084\u3055\u3093\u304c\u5922\u306b\u51fa\u3066\u304d\u3066\u5e78\u305b\u3067\u3057\u305f\u3002\u4eca\u3067\u3082\u5927\u597d\u304d\u3067\u3059\u3002 \u304a\u8fd4\u4e8b\u3092\u304a\u5f85\u305f\u305b\u3057\u3066"
  ,"screenshot":"http://screenshot.hatena.ne.jp/images/200x150/7/a/b/b/f/7b8dd3c69974d25f8f8c1f14a4991b7c41f.jpg"
  ,"entry_url":"http://b.hatena.ne.jp/entry/twitter.com/neenya00/status/899105175930941440"
}

ブクマしているユーザの一覧(おそらく公開する設定のブクマのみに絞り込まれてますが)が取得出来ます。