{"id":42472,"date":"2019-03-02T10:07:38","date_gmt":"2019-03-02T01:07:38","guid":{"rendered":"http:\/\/kako.com\/blog\/?p=42472"},"modified":"2019-03-02T10:59:48","modified_gmt":"2019-03-02T01:59:48","slug":"libcurl%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6google-maps-geolocation-api%e3%82%92%e5%91%bc%e3%81%b3%e5%87%ba%e3%81%97%e3%81%a6%e3%80%81%e5%91%a8%e5%9b%b2%e3%81%aewifi%e3%81%ae%e6%83%85%e5%a0%b1%e3%81%8b","status":"publish","type":"post","link":"http:\/\/kako.com\/blog\/?p=42472","title":{"rendered":"libcurl\u3092\u4f7f\u3063\u3066Google Maps Geolocation API\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u5468\u56f2\u306eWiFi\u306e\u60c5\u5831\u304b\u3089\u7def\u5ea6\u7d4c\u5ea6\u3092\u6c42\u3081\u308b\u30bd\u30d5\u30c8\u3092\u4f5c\u3063\u3066\u307f\u305f"},"content":{"rendered":"<p>libcurl\u3092\u4f7f\u3063\u3066Google Maps Geolocation API\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u5468\u56f2\u306eWiFi\u306e\u60c5\u5831\u304b\u3089\u7def\u5ea6\u7d4c\u5ea6\u3092\u6c42\u3081\u308b\u30bd\u30d5\u30c8\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002<br \/>\n<a href=\"http:\/\/kako.com\/blog\/?p=42347\">\u3053\u306e\u9593\u306eGeolocation API\u3092\u4f7f\u3046\u8a71<\/a>\u306e\u7d9a\u304d\u3060\u3002<\/p>\n<p>Windows 10\u3067\u52d5\u304f\u3082\u306e\u3092Visual Studio 2017\u306eC\u8a00\u8a9e\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3044\u305f\u3002<br \/>\n<a href=\"http:\/\/www.kako.com\/neta\/2012-015\/2012-015.html\">\u4ee5\u524d\u306b\u53e4\u3044Geolocation API\u3067\u4f5c\u3063\u305f\u30bd\u30d5\u30c8<\/a>\u306e\u713c\u304d\u76f4\u3057\u7248\u3060\u3002<br \/>\n<!--more--><\/p>\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9(geolocation.c)\u306f\u3053\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002\u3061\u3087\u3063\u3068\u9577\u3044\u3002\u305d\u3057\u3066\u3001\u30a8\u30e9\u30fc\u51e6\u7406\u3068\u304b\u304c\u7518\u3044\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#include &lt;stdio.h&gt;\r\n#include &lt;stdlib.h&gt;\r\n#include &lt;string.h&gt;\r\n#include &quot;curl.h&quot;\r\n#include &quot;jsmn.h&quot;\r\n#include &quot;google_maps_api_key.h&quot;\r\n\r\n#define LINELEN  1024\r\nchar url_str[LINELEN],mac_str[LINELEN],list_str[LINELEN*60],post_str[LINELEN*60];\r\nstruct MemoryStruct { char *memory; size_t size; };\r\nstruct MemoryStruct chunk;\r\n\r\nint WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp);\r\nint GetMACList(char *buf);\r\nint FindMAC(char *buf,int pos);\r\nint MakePOST(char *buf,int num,char *string);\r\n\r\nint main()\r\n{\r\n\tCURL *curl;\r\n\tCURLcode res;\r\n\tstruct curl_slist *list = NULL;\r\n\tjsmn_parser p;\r\n\tjsmntok_t tokens[40];\r\n\tint pos = 0 , mac_cnt = 0 , ok_flag = 0;\r\n\tchar buf[256];\r\n\tdouble lat , lng;\r\n\t\r\n\tif (GetMACList(list_str) == -1) {\r\n\t\tprintf(&quot;Error: cannot get MAC Address\\n&quot;);\r\n\t\treturn 1;\r\n\t}\r\n\t\/\/printf(&quot;%s\\n&quot;,list_str);\r\n\t\r\n\tMakePOST(post_str,1,NULL);\r\n\twhile (1) {\r\n\t\tpos=FindMAC(list_str,pos);\r\n\t\tif (pos == -1) { break; }\r\n\t\tif (mac_cnt!=0) { strcat(post_str,&quot;,&quot;); }\r\n\t\tstrncpy(mac_str,list_str+pos,17);\r\n\t\tpos+=17;\r\n\t\tMakePOST(post_str,2,mac_str);\r\n\t\tmac_cnt++;\r\n\t}\r\n\tMakePOST(post_str,3,NULL);\r\n\tif (mac_cnt==0) {\r\n\t\tprintf(&quot;WiFi MAC Address not found.\\n&quot;);\r\n\t\treturn 1;\r\n\t}\r\n\t\r\n\tprintf(&quot;JSON DATA:\\n%s\\n&quot;,post_str);\r\n\t\r\n\tstrcpy(url_str,&quot;https:\/\/www.googleapis.com\/geolocation\/v1\/geolocate?key=&quot;);\r\n\tstrcat(url_str,GOOGLE_MAPS_API_KEY);\r\n\t\r\n\tchunk.memory = malloc(1); chunk.size = 0;\r\n\tcurl = curl_easy_init();\r\n\tcurl_easy_setopt(curl, CURLOPT_URL, url_str);\r\n\tcurl_easy_setopt(curl, CURLOPT_POSTFIELDS, post_str );\r\n\tlist = curl_slist_append(list, &quot;Content-Type: application\/json&quot;);\r\n\tcurl_easy_setopt(curl, CURLOPT_HTTPHEADER, list);\r\n\tcurl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);\r\n\tcurl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&amp;chunk);\r\n\tcurl_easy_perform(curl);\r\n\tcurl_easy_cleanup(curl);\r\n\t\r\n\tprintf(&quot;RESULT:\\n%s\\n&quot;, chunk.memory);\r\n\t\r\n\tjsmn_init(&amp;p);\r\n\tjsmn_parse(&amp;p, chunk.memory , tokens, 40);\r\n\t\r\n\tif ((tokens[0].type == JSMN_OBJECT)&amp;&amp;(tokens[1].type == JSMN_STRING)) {\r\n\t\tstrncpy(buf, chunk.memory + tokens[1].start, tokens[1].end - tokens[1].start);\r\n\t\tbuf[tokens[1].end - tokens[1].start]='&#92;&#48;';\r\n\t\tif (strcmp(buf,&quot;location&quot;)==0) {\r\n\t\t\tif ((tokens[2].type == JSMN_OBJECT)&amp;&amp;(tokens[3].type == JSMN_STRING)) {\r\n\t\t\t\tstrncpy(buf, chunk.memory + tokens[3].start, tokens[3].end - tokens[3].start);\r\n\t\t\t\tbuf[tokens[3].end - tokens[3].start]='&#92;&#48;';\r\n\t\t\t\tif ((strcmp(buf,&quot;lat&quot;)==0)&amp;&amp;(tokens[4].type == JSMN_PRIMITIVE)) {\r\n\t\t\t\t\tstrncpy(buf, chunk.memory + tokens[4].start, tokens[4].end - tokens[4].start);\r\n\t\t\t\t\tbuf[tokens[4].end - tokens[4].start]='&#92;&#48;';\r\n\t\t\t\t\t\/\/printf(&quot;lat=&lt;%s&gt;\\n&quot;,buf);\r\n\t\t\t\t\tsscanf(buf,&quot;%lf&quot;,&amp;lat);\r\n\t\t\t\t}\r\n\t\t\t\tif ((tokens[5].type == JSMN_STRING)) {\r\n\t\t\t\t\tstrncpy(buf, chunk.memory + tokens[5].start, tokens[5].end - tokens[5].start);\r\n\t\t\t\t\tbuf[tokens[5].end - tokens[5].start]='&#92;&#48;';\r\n\t\t\t\t\tif ((strcmp(buf,&quot;lng&quot;)==0)&amp;&amp;(tokens[6].type == JSMN_PRIMITIVE)) {\r\n\t\t\t\t\t\tstrncpy(buf, chunk.memory + tokens[6].start, tokens[6].end - tokens[6].start);\r\n\t\t\t\t\t\tbuf[tokens[6].end - tokens[6].start]='&#92;&#48;';\r\n\t\t\t\t\t\t\/\/printf(&quot;lng=&lt;%s&gt;\\n&quot;,buf);\r\n\t\t\t\t\t\tsscanf(buf,&quot;%lf&quot;,&amp;lng);\r\n\t\t\t\t\t\tok_flag=1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tif (ok_flag==1) {\r\n\t\tprintf(&quot;latitude=%.8f , longitude=%.8f \\n&quot;,lat,lng);\r\n\t} else {\r\n\t\tprintf(&quot;Not enougth data to find location.\\n&quot;);\r\n\t}\r\n\t\r\n\tif (chunk.memory) { free(chunk.memory); }\r\n\t\r\n\tgetchar();\r\n\treturn 0;\r\n}\r\n\r\nint WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)\r\n{\r\n\tsize_t realsize = size * nmemb;\r\n\tstruct MemoryStruct *mem = (struct MemoryStruct *)userp;\r\n\tmem-&gt;memory = realloc(mem-&gt;memory, mem-&gt;size + realsize + 1);\r\n\tif (mem-&gt;memory == NULL) { printf(&quot;Errpr: Not enough memory\\n&quot;); exit(1); }\r\n\tmemcpy(&amp;(mem-&gt;memory[mem-&gt;size]), contents, realsize);\r\n\tmem-&gt;size += realsize;\r\n\tmem-&gt;memory[mem-&gt;size] = 0;\r\n\treturn realsize;\r\n}\r\n\r\nint GetMACList(char *buf)\r\n{\r\n\tFILE *fp = NULL;\r\n\tchar linebuf[LINELEN];\r\n\tbuf[0]='&#92;&#48;';\r\n\tif ((fp = _popen(&quot;netsh wlan show all | findstr BSSID&quot;, &quot;r&quot;)) == NULL) {\r\n\t\treturn -1;\r\n\t}\r\n\twhile (1) {\r\n\t\tif (fgets(linebuf,LINELEN-1,fp)==NULL) { break; }\r\n\t\tstrcat(buf,linebuf);\r\n\t}\r\n\t_pclose(fp);\r\n\treturn 0;\r\n}\r\n\r\nint FindMAC(char *buf,int pos)\r\n{\r\n\tint i,j,l,c,cnt;\r\n\tl=strlen(buf);\r\n\tif (l&gt;17) { l-=17; }\r\n\tfor (i=pos;i&lt;l;i++) {\r\n\t\tif ((buf[i+2]==':')&amp;&amp;(buf[i+5]==':')&amp;&amp;(buf[i+8]==':')&amp;&amp;(buf[i+11]==':')&amp;&amp;(buf[i+14]==':')) {\r\n\t\t\tcnt=0;\r\n\t\t\tfor (j=0;j&lt;17;j++) {\r\n\t\t\t\tc=buf[i+j];\r\n\t\t\t\tif (((c&gt;='0')&amp;&amp;(c&lt;='9'))||((c&gt;='A')&amp;&amp;(c&lt;='F'))||((c&gt;='a')&amp;&amp;(c&lt;='f'))) {\r\n\t\t\t\t\tcnt++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (cnt==12) { return i; }\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n}\r\n\r\nint MakePOST(char *buf,int num,char *string)\r\n{\r\n\tif (num==1) {\r\n\t\tbuf[0]='&#92;&#48;';\r\n\t\tstrcat(buf, &quot;{ &quot;);\r\n\t\tstrcat(buf,     &quot; \\&quot;considerIp\\&quot;: \\&quot;false\\&quot; , &quot;);\r\n\t\tstrcat(buf,     &quot; \\&quot;wifiAccessPoints\\&quot;: &quot;);\r\n\t\tstrcat(buf,     &quot; [ &quot;);\r\n\t} else if (num==2) {\r\n\t\tstrcat(buf,         &quot; { &quot;);\r\n\t\tstrcat(buf,             &quot;\\&quot;macAddress\\&quot;: \\&quot;&quot;); \r\n\t\tstrcat(buf,             string);\r\n\t\tstrcat(buf,             &quot;\\&quot; , &quot;); \r\n\t\tstrcat(buf,             &quot; \\&quot;signalStrength\\&quot;: -55 , &quot;);\r\n\t\tstrcat(buf,             &quot; \\&quot;signalToNoiseRatio\\&quot;: 0 &quot;);\r\n\t\tstrcat(buf,         &quot; } &quot;);\r\n\t} else if (num==3) {\r\n\t\tstrcat(buf,     &quot; ] &quot;);\r\n\t\tstrcat(buf, &quot;} &quot;);\r\n\t}\r\n\treturn 0;\r\n}\r\n<\/pre>\n<p>\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u306e\u90e8\u5206\u3067\u3001\u3053\u306e3\u3064\u3092\u3053\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3068\u306f\u5225\u306b\u7528\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#include &quot;curl.h&quot;\r\n#include &quot;jsmn.h&quot;\r\n#include &quot;google_maps_api_key.h&quot;\r\n<\/pre>\n<p>curl.h\u306f\u3001libcurl\u306e\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u3060\u3002libcurl\u306e32bit\u306edll\u7248\u3092\u30bd\u30fc\u30b9\u304b\u3089\u30d3\u30eb\u30c9\u3057\u3066\u3001\u305d\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7d44\u307f\u8fbc\u3093\u3067\u4f7f\u3046\u3002(\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30d0\u30a4\u30ca\u30ea\u3060\u3068Visual Studio 2017\u3067\u30ea\u30f3\u30af\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u30ea\u30f3\u30af\u3067\u304d\u306a\u304b\u3063\u305f\u308a\u3001\u6700\u65b0\u7248\u306e\u30d0\u30a4\u30ca\u30ea\u7248\u3067\u3082\u3046\u307e\u304f\u30ea\u30f3\u30af\u3067\u304d\u306a\u304b\u3063\u305f\u304b\u3089\u3060\u3002)<br \/>\n\u2192 <a href=\"http:\/\/kako.com\/blog\/?p=42351\">Visual Studio 2017\u3067libcurl\u3092\u4f7f\u304a\u3046\u3068\u3057\u3066\u3001libcurl\u306e\u30bd\u30fc\u30b9\u304b\u3089\u30d3\u30eb\u30c9\u3057\u3066\u52d5\u304b\u3057\u305f<\/a><\/p>\n<p>jsmn.h\u306f\u3001JSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092parse\u3057\u3066\u4e2d\u8eab\u3092\u53d6\u308a\u51fa\u3059\u306e\u306b\u4f7f\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3060\u3002\u3053\u3061\u3089\u306f\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u307e\u307e\u4f7f\u3063\u3066\u3044\u308b\u3002<\/p>\n<p>google_maps_api_key.h\u306f\u3001Google Maps\u306eAPI\u3092\u4f7f\u3046\u305f\u3081\u306eAPI\u30ad\u30fc\u3092\u66f8\u3044\u3066\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u3067\u3001API Key\u306f\u5229\u7528\u8005\u305d\u308c\u305e\u308c\u5404\u500b\u4eba\u304cKey\u3092\u6e96\u5099\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<br \/>\n\u5185\u5bb9\u306f\u6b21\u306e\u3088\u3046\u306a\u5f62\u5f0f\u306e\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u306b\u306a\u3063\u3066\u3044\u3066\u3001GOOGLE_MAPS_API_KEY\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b1\u884c\u3060\u3051\u3060\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#define GOOGLE_MAPS_API_KEY &quot;\u3053\u3053\u306b\u5404\u81ea\u306eAPI Key\u3092\u66f8\u304f\u3053\u3068&quot;\r\n<\/pre>\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u52d5\u4f5c\u3068\u3057\u3066\u306f\u3001\u524d\u534a\u3067\u3001popen\u3092\u4f7f\u3063\u3066Windows\u306enetsh\u30b3\u30de\u30f3\u30c9\u3092\u5916\u90e8\u30d7\u30ed\u30bb\u30b9\u3068\u3057\u3066\u547c\u3073\u51fa\u3057\u3066\u3001\u7d50\u679c\u3092\u53d6\u308a\u8fbc\u3080\u3002\u305d\u3057\u3066\u3001MAC\u30a2\u30c9\u30ec\u30b9(BSSID)\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3059\u3002<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5f8c\u534a\u3067\u306f\u3001MAC\u30a2\u30c9\u30ec\u30b9\u306e\u30c7\u30fc\u30bf\u3092Geolocation API\u306b\u6e21\u305b\u308b\u3088\u3046\u306bJSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u306b\u5909\u63db\u3057\u3066\u3001\u305d\u308c\u3092\u4f7f\u3063\u3066API\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u7d50\u679c\u3092\u5f97\u308b\u3002\u305d\u3057\u3066jsmn\u3092\u4f7f\u3063\u3066\u7d50\u679c\u306eJSON\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u304b\u3089\u7def\u5ea6\u7d4c\u5ea6\u3092\u53d6\u308a\u51fa\u3059\u3002<br \/>\n\u3068\u3044\u3046\u5185\u5bb9\u3060\u3002<\/p>\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u30d3\u30eb\u30c9\u306b\u306fVisual Studio\u306enmake\u30b3\u30de\u30f3\u30c9\u3092\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u4f7f\u3046\u3002<br \/>\n\u30e1\u30a4\u30af\u30d5\u30a1\u30a4\u30eb(Makefile.txt)\u306f\u3001\u6b21\u306e\u3088\u3046\u306a\u5185\u5bb9\u3060\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nTARGET\t=\tgeolocation.exe\r\nOBJS\t=\tgeolocation.obj\r\nLIBS\t=\tlibcurl.lib jsmn.lib\r\nLIBPATH\t=\tlib\r\nINCPATH\t=\t-I&quot;include\/curl&quot; -I&quot;include&quot;\r\nCFLAGS\t=\t-c -DCURL_STATICLIB $(INCPATH)\r\n\r\n.c.obj:\r\n\tcl $(CFLAGS) $&lt;\r\n$(TARGET):\t$(OBJS)\r\n\tcl $(OBJS) $(LIBS) \/link\/LIBPATH:$(LIBPATH) \/out:$(TARGET)\r\n<\/pre>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u5165\u529b\u3059\u308b\u4ee3\u308f\u308a\u306b\u6b21\u306e\u3088\u3046\u306abat\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u3042\u308a\u3001\u3053\u308c\u3092\u4f7f\u3063\u3066\u30d3\u30eb\u30c9\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nrem set environment for Visual Studio 2017\r\ncall &quot;C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat&quot; x86\r\n\r\nrem build\r\ndel *.obj\r\nnmake -f makefile.txt\r\n<\/pre>\n<p>\u30d3\u30eb\u30c9\u3057\u3066\u3067\u304d\u305fexe\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3059\u308c\u3070\u3001\u3042\u3068\u306f\u81ea\u52d5\u3067PC\u306b\u5185\u8535\u3055\u308c\u305fWiFi\u6a5f\u80fd\u3067\u691c\u51fa\u3057\u305f\u5468\u56f2\u306e\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u306e\u60c5\u5831\u304b\u3089\u7def\u5ea6\u7d4c\u5ea6\u60c5\u5831\u3092\u5f97\u3089\u308c\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>libcurl\u3092\u4f7f\u3063\u3066Google Maps Geolocation API\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u5468\u56f2\u306eWiFi\u306e\u60c5\u5831\u304b\u3089\u7def\u5ea6\u7d4c\u5ea6\u3092\u6c42\u3081\u308b\u30bd\u30d5\u30c8\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002 \u3053\u306e\u9593\u306eGeolocation API\u3092\u4f7f\u3046\u8a71\u306e\u7d9a\u304d\u3060\u3002 Windo [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13,14],"tags":[],"_links":{"self":[{"href":"http:\/\/kako.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/42472"}],"collection":[{"href":"http:\/\/kako.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/kako.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/kako.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/kako.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42472"}],"version-history":[{"count":4,"href":"http:\/\/kako.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/42472\/revisions"}],"predecessor-version":[{"id":42476,"href":"http:\/\/kako.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/42472\/revisions\/42476"}],"wp:attachment":[{"href":"http:\/\/kako.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/kako.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42472"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/kako.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}