feedly APIã使ã£ã¦ã¿ã
RSSãªã¼ãã¼ã¨ãã¦ä½¿ã£ã¦ãããµã¼ãã¹ãfeedlyã®APIã使ããã¨ããã¨ããæå¤ã¨å¼ã£ããã£ãã®ã§ã使ãæ¹ãæ¸ãæ®ãã¦ããã¾ãã
ä»æ¥ï¼2015/11/19ï¼æç¹ã®API ãV3ã§ç¢ºèªããã¦ãã¾ãã
ã¢ã¯ã»ã¹ãã¼ã¯ã³ãåå¾ãã
Web APIã¯æ§ã ã«ããã¾ãããä¼æ¥ãå ¬éãã¦ããAPIãå©ç¨ããéã¯å¾ã ã«ãã¦ã¢ã¯ã»ã¹ãã¼ã¯ã³ã¨ãããã®ãå¿ è¦ã«ãªãã¾ãã
åã¦ã¼ã¶ã¼ã«ç´ä»ããããæååã§ãããå ¬éå ãã¢ã¯ã»ã¹ã®ç®¡çã»è§£æãããç®çã¨ãã¦å¿ è¦ã§ããã¨ããç解ãç§ã¯ãã¦ãã¾ãã
æé ã¯ç°¡åã§ãã
èªè¨¼
https://feedly.com/v3/auth/devã«ã¢ã¯ã»ã¹ããããããã®æ¹æ³ï¼ãã§ã«èªèº«ã使ã£ã¦ããèªè¨¼æ¹æ³ï¼ãé¸æãã¦èªè¨¼ãè¡ãã¾ãã
ã¡ãã»ã¼ã¸ã®ç¢ºèª
èªè¨¼å¾ã®ç»é¢ã«è¨è¼ããã¦ããé£çµ¡å ããã§ãã¯ãã¾ãã
ä»åã¯Googleã§èªè¨¼ãè¡ã£ããããèªåã®ã¢ãã¬ã¹****@google.comã®ã¡ã¼ã«ããã§ãã¯ãã¾ãã
ãªã³ã¯ã¸ã®ã¢ã¯ã»ã¹
ã¡ãã»ã¼ã¸ãfeedlyããéããã¦ãã¦ããã®ã§ãè¨è¿°ããã¦ããURLã«é£ã¶ã¨ã
ã¢ã¯ã»ã¹ãã¼ã¯ã³ã表示ããã¦ãã¾ãã
表示æ¬ã¯å°ããã§ããã横ã«ã¹ã¯ãã¼ã«ããã¦çµæ§ãªæåæ°ã¨ãªãã¾ããï¼ä»å試ããã¨ãã242æåããã¾ãããï¼
使ã£ã¦ã¿ã
curlã§åãåããçµæãGETã§åå¾ãã¦ã¿ã¾ãããã
åãåããå½¢å¼ã¯ãããªæãã§ãã
$ curl -s -H 'Authorization: OAuth [ãã¼ã¯ã³]' [ã¢ã¯ã»ã¹URL]
åå¾ãããã¼ã¯ã³ãä»ä»®ã« "MyToken" ã¨ããæååã
ã¢ã¯ã»ã¹URLãhttps://cloud.feedly.com/v3/categoriesã¨ããã¨ã
$ curl -s -H 'Authorization: OAuth MyToken' https://cloud.feedly.com/v3/categories
ã¨ãªãã¾ãã
ã¢ã¯ã»ã¹URLã¯æ¬²ããæ å ±ã«ããç°ãªãã®ã§ãå ¬å¼ããã¥ã¡ã³ããè¦ã¦ã¿ã¦ããããã
çµæã¯JSONã§å¸°ã£ã¦ããã¿ãããªã®ã§ããã¨ã¯ããããã¼ã¹ãã¦ãã¾ãæ´»ç¨ããã°OKã§ãã
curlã®ãªãã·ã§ã³ã§ãã -s ã¨-H ã¯ããããã
-s : é²æç¶æ³ãã¨ã©ã¼ã表示ããªã
-H : HEADER HTTPãããã«HEADERã追å ãããã¯å¤æ´ãã
ã¨ããæå³ãããã§ããåè
ããã§ã¨ããããã¢ã¯ã»ã¹ãåºæ¥ãããã«ãªãã¾ããï¼