{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/tag/api/feed/json/ -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/api/", "feed_url": "https://matoken.org/blog/tag/api/feed/json/", "language": "ja", "title": "API – matoken's blog", "description": "Is there no plan B?", "icon": "https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9.jpeg", "items": [ { "id": "https://matoken.org/blog/?p=4086", "url": "https://matoken.org/blog/2024/08/16/openweathermap-api-updated/", "title": "OpenWeatherMap \u306e API \u3092\u66f4\u65b0 -One Call API 3.0-", "content_html": "
\u4ee5\u524d\u304b\u3089\u4f55\u5ea6\u304b\u30e1\u30fc\u30eb\u304c\u6765\u3066\u3044\u305f\u306e\u3067\u3059\u304c\uff0c\u5929\u6c17\u60c5\u5831\u306e\u63d0\u4f9b\u3092\u3057\u3066\u304f\u308c\u3066\u3044\u308b OpenWeatherMap \u304c One Call 2.5 \u3092\u30af\u30ed\u30fc\u30ba\u3059\u308b\u306e\u3067 One Call 3.0 \u306b\u79fb\u884c\u3059\u308b\u3088\u3046\u306b\u3068\u306e\u3053\u3068\u3067\u3059\uff0e
\n\u30af\u30ed\u30fc\u30ba\u306f6\u6708 → 2024-08-19 \u3068\u4f38\u3073\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3082\u3046\u4f38\u3073\u306a\u305d\u3046\u3060\u306a\u3068\u79fb\u884c\u3057\u3066\u307f\u307e\u3057\u305f\uff0e
\n
\u81ea\u5206\u306f OpenWeatherMap \u306e API \u306f\u500b\u4eba\u5229\u7528\u306e\u307f\u3067 PC \u306e\u30a6\u30a3\u30b8\u30c3\u30c8\uff0c\u305f\u307e\u306b\u624b\u52d5\u3067 wego \u7b49\u3067\u5929\u6c17\u78ba\u8a8d\uff0cAndroid \u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3(QuickWeather)\u3068\u3044\u3046\u611f\u3058\u3067\u3059\uff0e
\n\n\n\n\n\n\nOne Call 3.0 is free 1,000 calls/day\n
1\u65e51000\u56de\u307e\u3067\u7121\u6599\u3068\u306e\u3053\u3068\u306a\u306e\u3067\u306a\u306b\u304b\u30d0\u30b0\u3067\u3082\u8e0f\u3093\u3060\u308a\u3057\u306a\u3044\u9650\u308a\u4f59\u88d5\u3067\u3057\u3087\u3046\uff0e
\n\u4e00\u5fdc\u79fb\u884c\u30ac\u30a4\u30c9\u3082\u3042\u308a\u307e\u3059\uff0e
\n\u79fb\u884c\u30ac\u30a4\u30c9\u306e Subscribe \u30ea\u30f3\u30af\u304b\u3089\u8fbf\u308b\u3068\u8acb\u6c42\u60c5\u5831\u306a\u3069\u3092\u5165\u529b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3088\u3046\u3067\u3059\uff0e\u3053\u308c\u307e\u3067\u306f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304f\u3089\u3044\u3060\u3063\u305f\u306e\u3067\u3061\u3087\u3063\u3068\u9762\u5012\uff0e
\n\u8acb\u6c42\u5148\u306fstripe \u7d4c\u7531\u3067\u306e JCB \u3082 OK \u3067\u3057\u305f\uff0e
\n\u8acb\u6c42\u60c5\u5831\u304c\u3046\u307e\u304f\u901a\u308b\u3068\u300cBilling plans\u300d\u306b\u79fb\u52d5\u3057\u307e\u3059\uff0e
\nPrice (excl. VAT) \u3092\u898b\u308b\u3068\uff0c
\n\n\n\nFree limit per day: 1,000 calls
\n
\nAfter: 0.12 GBP per 100 calls
\u3068\u306e\u3053\u3068\u3067 1\u65e51000\u56de\u307e\u3067\u7121\u6599\uff0c\u305d\u306e\u5f8c\u306f 100\u547c\u3073\u51fa\u3057\u3054\u3068\u306b 0.12 GBP(\u57f7\u7b46\u6642\u70b9\u3067 23.04\u5186) \u639b\u308b\u3088\u3046\u3067\u3059\uff0e
\n2000\u56de\u307e\u3067\u547c\u3079\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u6700\u5927 230\u5186/\u65e5\u307b\u3069\u306b\u306a\u308a\u305d\u3046\uff0e
\u547c\u3073\u51fa\u3057\u5236\u9650\u306e\u300cCalls per day (no more than)\u300d\u304c 2000 \u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\uff0c 900 \u306b\u5909\u66f4\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u591a\u5206\u7121\u6599\u67a0\u306e 1000 \u56de\u3088\u308a\u524d\u306e 900 \u56de\u3067\u6b62\u307e\u308b\u3068\u601d\u3044\u307e\u3059\uff0e
\u5229\u7528\u306e\u969b\u306e API key \u3067\u3059\u304c\uff0c\u4ee5\u524d\u306e 2.5 \u306e\u3068\u304d\u306e\u3082\u306e\u304c\u305d\u306e\u307e\u307e\u4f7f\u3048\u308b\u3088\u3046\u3067\u3059\uff0e\u305f\u3060\uff0cOne Call 3.0 \u306b\u79fb\u884c\u3057\u3066\u3059\u3050\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a8\u30e9\u30fc\u3068\u306a\u308a\uff0c\u6570\u5206\u7a0b\u3059\u308b\u3068\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3088\u3046\u3067\u3059\uff0e
\n$ curl 'https://api.openweathermap.org/data/3.0/onecall?lat=33.44&lon=-94.04&appid=API_KEY'\n{\"cod\":401, \"message\": \"Please note that using One Call 3.0 requires a separate subscription to the One Call by Call plan. Learn more here https://openweathermap.org/price.\nIf you have a valid subscription to the One Call by Call plan, but still receive this error, then please see https://openweathermap.org/faq#error401 for more info.\"}\nAPI \u306e\u5229\u7528\u72b6\u6cc1\u306f https://home.openweathermap.org/statistics/onecall_30 \u3067\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\uff0e\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\uff0e\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u306f\u306a\u304f\u5c11\u3057\u9045\u308c\u308b\u3088\u3046\u3067\u3059\uff0e
\n
\n
\u66ab\u304f\u306f\u6bce\u65e5\u3053\u3053\u3092\u898b\u3066\u304a\u3053\u3046\u3068\u601d\u3044\u307e\u3059\uff0e
\n\u6700\u8fd1\u653e\u7f6e\u304c\u3061\u3060\u3063\u305fpocket\u3092\u6d3b\u7528\u3057\u59cb\u3081\u307e\u3057\u305f\uff0eAndroid\u7aef\u672b\u3067\u9699\u9593\u6642\u9593\u306bRSS\u6d88\u5316\u3057\u3066\u6c17\u306b\u306a\u3063\u305f\u3082\u306e\u3092pocket\u306b\u6295\u3052\u3066\u304a\u3044\u3066\u5f8c\u3067PC\u3067\u8aad\u3080\u3068\u3044\u3046\u611f\u3058\u306e\u30d6\u30c3\u30af\u30de\u30fc\u30af\u4ee3\u308f\u308a\u306a\u611f\u3058\u3067\u3059\uff0e
\n\u3053\u3053\u306b\u6295\u7a3f\u3057\u305f\u3082\u306e\u3092\u65e5\u6bce\u306b\u4fdd\u5b58\u3057\u3066\u304a\u304f\u3068\u4fbf\u5229\u304b\u3082\u3068\u8a66\u3057\u305f\u8a18\u9332\u3067\u3059\uff0e
\n\u307e\u305a\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u767b\u9332\u3092\u3059\u308b
\n\u8a18\u4e8b\u304c\u8aad\u3081\u308c\u3070\u3044\u3044\u306e\u3067\uff0cpermissions\u306f`Retrieve`
\n\u306b\u3057\u305f\uff0e\u767b\u9332\u3059\u308b\u3068\uff0cCONSUMER KEY \u304c\u5165\u624b\u3067\u304d\u308b\uff0e
$ curl -H \"Content-Type: application/json; charset=UTF-8\" -X POST \\\r\n https://getpocket.com/v3/oauth/request \\\r\n -d '\r\n{\r\n \"consumer_key\" : \"XXXX-XXXXXXXXXXXXXXXXXXXXXXXX\",\r\n \"redirect_uri\":\"http://matoken.org/\"\r\n}\r\n'\n\u7d50\u679c
\ncode=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXX\n
\u30a6\u30a7\u30d6\u30d6\u30e9\u30a6\u30b6\u3067
\n`https://getpocket.com/auth/authorize?request_token=&redirect_uri=http://matoken.org/’
\n\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u8a31\u53ef\u3059\u308b\uff0eurl\u306f\u9069\u5f53\uff0e

$ curl -H \"Content-Type: application/json; charset=UTF-8\" -X POST \\\r\nhttps://getpocket.com/v3/oauth/authorize \\\r\n-d '\r\n{\r\n \"consumer_key\":\"<CONSUMER_KEY>\",\r\n \"code\":\"<REQUEST_TOKEN>\"\r\n}\r\n'\n\u7d50\u679c
\naccess_token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXX&username=user%40example.com\n
application/json \u3067\u6c42\u3081\u308b\uff0e\u3068\u308a\u3042\u3048\u305a1\u4ef6\u3060\u3051(count'':1”)
$ curl -H \"Content-Type: application/json; charset=UTF-8\" -X POST \\\r\nhttps://getpocket.com/v3/get -d '\r\n{\r\n \"consumer_key\":\"<CONSIMMER_KEY>\",\r\n \"access_token\":\"<ACCESS_TOKEN>\",\r\n \"count\":1\r\n}\r\n' | jq\r\n{\r\n \"status\": 1,\r\n \"complete\": 1,\r\n \"list\": {\r\n \"2692971736\": {\r\n \"item_id\": \"2692971736\",\r\n \"resolved_id\": \"2692971736\",\r\n \"given_url\": \"https://www.patreon.com/posts/29180933\",\r\n \"given_title\": \"DUVET | 1041uuu on Patreon\",\r\n \"favorite\": \"0\",\r\n \"status\": \"0\",\r\n \"time_added\": \"1565885008\",\r\n \"time_updated\": \"1565885011\",\r\n \"time_read\": \"0\",\r\n \"time_favorited\": \"0\",\r\n \"sort_id\": 0,\r\n \"resolved_title\": \"\",\r\n \"resolved_url\": \"https://www.patreon.com/posts/29180933\",\r\n \"excerpt\": \"\",\r\n \"is_article\": \"0\",\r\n \"is_index\": \"0\",\r\n \"has_video\": \"0\",\r\n \"has_image\": \"0\",\r\n \"word_count\": \"0\",\r\n \"lang\": \"\",\r\n \"domain_metadata\": {\r\n \"name\": \"Patreon\",\r\n \"logo\": \"https://logo.clearbit.com/patreon.com?size=800\",\r\n \"greyscale_logo\": \"https://logo.clearbit.com/patreon.com?size=800&greyscale=true\"\r\n },\r\n \"listen_duration_estimate\": 0\r\n }\r\n },\r\n \"error\": null,\r\n \"search_meta\": {\r\n \"search_type\": \"normal\"\r\n },\r\n \"since\": 1565886741\r\n}\napplication/x-www-form-urlencoded \u3067\u6c42\u3081\u308b\uff0e\u7d50\u679c\u306f\u540c\u3058\u3067json\u5f62\u5f0f\u3067\u5e30\u3063\u3066\u304f\u308b\uff0e
\n$ curl -H \"Content-Type: application/x-www-form-urlencoded; charset=UTF-8\" -X POST https://getpocket.com/v3/get -d \\\r\n \"consumer_key=<CONSUMER_KEY>&access_token=<ACCES_TOKEN>&state=all&sort=oldest&detailType=symple&since=`date -d'1days ago' +%s`\" | jq .\n
\u5f15\u6570\u306e\u610f\u5473\u306f\u3053\u3093\u306a\u611f\u3058
\nstate=all : \u5168\u3066\u306e\u6295\u7a3f\u5f62\u5f0f(\u65e2\u8aad\u672a\u8aad\u306e\u4e21\u65b9)
\nsort=oldest : \u53e4\u3044\u3082\u306e\u304b\u3089\u9806\u306b
\ndetailType=simple : \u57fa\u672c\u7684\u306a\u60c5\u5831
\nsince=date -d'1days ago' +%s : \u6307\u5b9a\u3057\u305fUNIX
\nTime\u4ee5\u964d\u306e\u8a18\u4e8b\u3092\u53d6\u5f97\uff0e\u53d6\u5f97\u3059\u308b\u958b\u59cbUNIX Time\u3092GNU coreutils\u306edate
\ncommand\u3067\u904e\u53bb1\u65e5(-d\u20191days ago\u2019)\u6642\u70b9\u306eUNIX Time(+%s)\u3092\u53d6\u5f97\u3057\u3066\u6307\u5b9a
$ sudo -u www-data crontab -l | grep wiki\r\n0 0 1 * * mkdir -p /var/lib/dokuwiki/farm/wiki.matoken.org/data/pages/memo/`date +\\%Y/%m`\r\n2 0 * * * curl -s -H \"Content-Type: application/x-www-form-urlencoded; charset=UTF-8\" -X POST https://getpocket.com/v3/get -d \"consumer_key=87275-eea7fa53556961262450492d&access_token=27847a46-0ff9-f9a3-ea7f-31279b&state=all&sort=oldest&detailType=symple&since=`date -d'1days ago' +%s`\" | jq -r '.list[] | [.given_title,.given_url] | @csv' | sed -e 's/^\"/* [/' | sed -e 's/\",\"/](/' | sed -e 's/\"$/)/' | sed -e 's/^\\[]/\\[null]/' | sed '1s/^/\\n/' >> /var/lib/dokuwiki/farm/wiki.matoken.org/data/pages/memo/`date +\\%Y/\\%m/\\%F`.txt\n
1\u884c\u76ee
\n0 0 1 * * : \u6bce\u67081\u65e5\u306e00:00\u306b\u5b9f\u884c
mkdir -p /var/lib/dokuwiki/farm/wiki.matoken.org/data/pages/memo/`date : \u6708\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6398\u308b\uff0e%\u304c\u30a8\u30b9\u30b1\u30fc\u30d7\u3055\u308c\u3066\u3044\u308b\u306e\u306fcrontab\u306e\u4f7f\u7528\u306b\u5408\u308f\u305b\u3066\uff0e
\n+%Y/%m`
1 0 * * * : \u6bce\u65e5 00:01 \u306b\u5b9f\u884c
2\u884c\u76ee
\njq -r '.list[] | [.given_title,.given_url] | @csv' :
\npocket\u304b\u3089\u306e\u7d50\u679c\u304b\u3089title\u3068url\u3092\u629c\u304d\u51fa\u3057\u3066csv\u5f62\u5f0f\u3067\u51fa\u529b
sed -e 's/^\"/* [/' | sed -e 's/\",\"/](/' | sed -e 's/\"$/)/' | sed -e 's/^\\[]/\\[null]/'
\n: markdown\u306e\u30ea\u30f3\u30af\u306b\u5909\u63db
sed '1s/^/\\n/' :
\n\u5148\u982d\u884c\u3092\u7a7a\u3051\u306a\u3044\u3068markdown\u3092\u8a8d\u8b58\u3057\u306a\u3044\u3088\u3046\u306a\u306e\u3067\u6539\u884c\u3092\u5165\u308c\u308b
/var/lib/dokuwiki/farm/wiki.matoken.org/data/pages/memo/`date +\\%Y/\\%m/\\%F`.txt`
\n: \u4fdd\u5b58\u5148\uff0cdokuwiki\u3067\u306f memo:2019:08:2019-08-16 \u306e\u3088\u3046\u306b\u306a\u308b
pocket\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u7ba1\u7406\u306e\u4e2d\u306bRSS\u30d5\u30a3\u30fc\u30c9\u306e\u9805\u76ee\u304c!
\n
\u3053\u308c\u3092\u516c\u958b\u306b\u3057\u3066\u300c\u3059\u3079\u3066\u306e\u30a2\u30a4\u30c6\u30e0\u30d5\u30a3\u30fc\u30c9\u300d\u3092\u53d6\u5f97\u3059\u308c\u3070\u3084\u308a\u305f\u304b\u3063\u305f\u3053\u3068\u304c\u51fa\u6765\u305f\u2026\u2026\uff0e
\n\u7d30\u304b\u3044\u5236\u5fa1\u3092\u3057\u305f\u3044\u306a\u3089API\u306e\u307b\u3046\u304c\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u304c\uff0c\u4eca\u56de\u81ea\u5206\u304c\u3084\u308a\u305f\u304b\u3063\u305f\u306e\u306f\u6bce\u65e5\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3060\u3063\u305f\u306e\u3067\u2026\u2026\uff0e\u3082\u3046\u8a2d\u5b9a\u7d42\u308f\u3063\u305f\u304b\u3089\u3053\u308c\u306f\u898b\u306a\u304b\u3063\u305f\u3053\u3068\u306b\uff0e
\n$ rsstail -l -1 -n5 -H -u \"http://getpocket.com/users/*sso1456706866592e34/feed/all\"\r\nTitle: \u30a8\u30ed\u306e\u79d8\u5bc6\u7d50\u793e \u30c9\u30b7\u30b3\u30eb\u30c9 EP.38\u3000\u5922\u73fe\u306e\u30a8\u30e2\u30fc\u30b7\u30e7\u30f3 - \u7121\u6599\u30b3\u30df\u30c3\u30af ComicWalker\r\nLink: https://comic-walker.com/viewer?tw=2&dlcl=ja&cid=KDCW_MF00000086010039_68&bs=1\r\nTitle: \u6b21\u4e16\u4ee3\u885b\u661f\u5411\u3051\u300c\u30b0\u30ea\u30fc\u30f3\u71c3\u6599\u300d\u3000\u6708\u63a2\u67fb\u3067\u3082\u4f7f\u7528\u304b\u3000\u65e5\u7c73\u304c\u958b\u767a\u7af6\u4e89\r\nLink: https://sankei.com/life/news/190815/lif1908150010-n1.html\r\nTitle: ArchiveBox\r\nLink: https://archivebox.io\r\nTitle: \u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4f01\u696d\u304c\u7ba1\u7406\u3059\u308b\u7d042800\u4e07\u4ef6\u306e\u751f\u4f53\u8a8d\u8a3c\u8a18\u9332\u304c\u6d41\u51fa\u3057\u3066\u3044\u305f\u3053\u3068\u304c\u5224\u660e\r\nLink: https://gigazine.net/news/20190815-data-breach-biometric-security\r\nTitle: DUVET | 1041uuu on Patreon\r\nLink: https://patreon.com/posts/29180933\n
$ dpkg-query -W curl sed jq rsstail dokuwiki\r\ncurl 7.64.0-4\r\ndokuwiki 0.0.20180422.a-2\r\njq 1.5+dfsg-2+b1\r\nrsstail 1.8-1+b1\r\nsed 4.7-1\r\n$ lsb_release -dr\r\nDescription: Debian GNU/Linux 10 (buster)\r\nRelease: 10\r\n$ uname -m\r\nx86_64\n