Upgrade to Pro — share decks privately, control downloads, hide ads and more …

mbedで作るニコニコ新着動画表示器

 mbedで作るニコニコ新着動画表示器

mbed + ニコニコ新検索β の検索APIを使ってニコニコ動画のカテゴリごとの新着動画を表示するデバイスを作ってみました。

Yoshihiro MIYAI

August 30, 2014
Tweet

More Decks by Yoshihiro MIYAI

Other Decks in Technology

Transcript

  1. 8FC"1*ͰΑ͘࢖ΘΕΔσʔλϑΥʔϚοτ { "query" : "χίχίٕज़෦", "service" : ["video"], "search" :

    ["tags"], "join" : ["cmsid", "title", "start_time"], "from" : 0, "size" : 1, "sort_by" : "start_time", "order" : "desc", "issuer" : "apiguide", "reason" : "mbed festival" } +40/ +BWB4DSJQU0CKFDU/PUBUJPO
  2. ઌ΄Ͳͷ+40/ɿ { "query" : "χίχίٕज़෦", "service" : ["video"], "search" :

    ["tags"], "join" : ["cmsid", "title", "start_time"], "from" : 0, "size" : 1, "sort_by" : "start_time", "order" : "desc", "issuer" : "apiguide", "reason" : "mbed festival" } શମ͸ෳ਺ͷΩʔΛ΋ͭ࿈૝഑ྻ
  3. GET / HTTP/1.1 User-Agent: curl/7.30.0 Host: your-app.herokuapp.com Accept: */* Connection:

    close ϦΫΤετ ϔομ )551Ͱ͸)PTU͕ඞਢ )551ϝιουϦΫΤετύεϓϩτίϧόʔδϣϯ ϦΫΤετϝοηʔδɿ
  4. HTTP/1.1 200 OK Content-Type: text/html;charset=Shift_JIS Content-Length: 28 Server: WEBrick/1.3.1 (Ruby/2.0.0/2014-05-08)

    Date: Sat, 30 Aug 2014 00:55:14 GMT Via: 1.1 vegur ! sm0|šƃŲƅſ|αϯϓϧϦΫΤετ ϓϩτίϧόʔδϣϯεςʔλείʔυϝοηʔδ Ϩεϙϯεϔομʔ ϨεϙϯεϘσΟ Ϩεϙϯεϝοηʔδɿ
  5. NCFEP⒏DJBMͷϓϩάϥϜɿ ʙߦ໨ɿ sock.connect("mbed.org", 80); ! char http_cmd[] = "GET /media/uploads/

    mbed_official/hello.txt HTTP/1.0\n\n"; sock.connect(“your-app.heroku.com”, 80); ! char http_cmd[] = "GET / HTTP/1.1\r \nHost: your_app.herokuapp.com\r \nConnection: close\r\n\r\n";
  6. NCFEP⒏DJBMͷϓϩάϥϜɿ HTTP/1.1 200 OK Content-Type: text/html;charset=utf-8 Date: Tue, 15 Jul

    2014 16:25:58 GMT Server: WEBrick/1.3.1 (Ruby/ 2.0.0/2014-05-08) Content-Length: 28 Connection: Close ! sm0|šƃŲƅſ|αϯϓϧϦΫΤετ Ϩεϙϯεɿ