{"id":209014,"date":"2014-01-14T11:08:07","date_gmt":"2014-01-14T07:08:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=209014"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=209014","title":{"rendered":"<span class=\"post_title\">\u0414\u0435\u043b\u0430\u0435\u043c \u0437\u0432\u043e\u043d\u043e\u043a \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u00ab\u0417\u0432\u043e\u043d\u043e\u043a \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a\u00bb \u0438\u043b\u0438 Push2Dial (P2D) \u2014 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 \u043d\u043e\u0432\u044b\u043c 2\u0413\u0418\u0421. \u0421\u0443\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0430 \u2014 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044e, \u043a\u043b\u0438\u043a\u0430\u0435\u0442\u0435 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u2014 \u0438 \u043e\u043d \u0433\u043e\u0442\u043e\u0432 \u043a \u043d\u0430\u0431\u043e\u0440\u0443 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0435.<\/p>\n<p>  \u0424\u0438\u0447\u0430 \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0448\u0430\u043d\u0441\u044b \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043d\u0435 \u0442\u0443\u0434\u0430 \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043a \u043d\u0443\u043b\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/667\/72b\/cf6\/66772bcf6bd30647ffba1333f5d31b6b.jpg\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0417\u0432\u043e\u043d\u0438\u0442\u044c \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u0438\u0437 \u0431\u0435\u0442\u0430-\u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u043d\u043b\u0430\u0439\u043d\u043e\u0432\u043e\u0433\u043e 2\u0413\u0418\u0421, \u0442\u0430\u043a \u0438 \u0438\u0437 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0434\u043e\u0431\u0440\u043e\u0433\u043e \u043e\u0444\u043b\u0430\u0439\u043d\u043e\u0432\u043e\u0433\u043e. \u041e\u0431\u0430 \u043e\u043d\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 API, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043f\u043e \u0442\u0430\u043a\u043e\u043c\u0443 \u0441\u043b\u0443\u0447\u0430\u044e, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c. <\/p>\n<p>  API P2D, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%A2%D0%B5%D1%85%D0%BD%D0%BE%D0%BB%D0%BE%D0%B3%D0%B8%D1%8F_Push\">\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439<\/a>. \u041d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u0431\u0435\u0441\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e \u0437\u0430\u043b\u0435\u0437\u0430\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u0438\u043c \u0432\u0437\u0434\u0443\u043c\u0430\u0435\u0442\u0441\u044f, \u0430\u043d\u0435\u043a\u0434\u043e\u0442\u044b \u043f\u0440\u043e Android \u0438 \u0440\u043e\u0437\u0435\u0442\u043a\u0443 \u0441\u0442\u0430\u043d\u0443\u0442 \u0441\u0443\u0440\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f. \u041d\u0430 iOS push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u2014 \u0447\u0430\u0441\u0442\u044c API \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 2\u0413\u0418\u0421 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Apple_Push_Notification_Service\">APNS<\/a>.<br \/>  \u041d\u0430 Android \u0436\u0435 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 Google Play Services, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Google_Cloud_Messaging\">Google Cloud Messaging<\/a>.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0438\u043a\u043e\u043d\u043a\u0443 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u043e\u0439 \u0442\u0440\u0443\u0431\u043a\u0438 \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c 2\u0413\u0418\u0421? \u0415\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0430\u0442 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441 <a href=\"http:\/\/msk.2gis.ru\/about\/pc\/?utm_source=news&amp;utm_medium=habr&amp;utm_campaign=post_p2d\">2\u0413\u0418\u0421 \u0434\u043b\u044f \u041f\u041a<\/a> \u0438\u043b\u0438 \u0436\u0435 \u0441 <a href=\"http:\/\/beta.2gis.ru\/?utm_source=news&amp;utm_medium=habr&amp;utm_campaign=post_p2d\">beta.2gis.ru<\/a>. \u041c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439 2\u0413\u0418\u0421 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 push-\u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439 (\u0438\u043b\u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c), \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 API Push2Dial \u0437\u0430\u043f\u0440\u043e\u0441, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0432 \u0441\u0435\u0431\u0435 token \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0435\u0433\u043e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 (iOS \u0438\u043b\u0438 Android).<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e3a\/7e7\/f95\/e3a7e7f951f82ea947677d18cd09e5da.png\"\/><\/p>\n<p>  API Push2Dial \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 pin-\u043a\u043e\u0434 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u043a\u0443 \u201cpin-&gt;\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u201d, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043a\u043b\u0430\u0434\u0435\u0442 \u0432 memcache \u043d\u0430 10 \u043c\u0438\u043d\u0443\u0442. \u0412 \u043e\u0442\u0432\u0435\u0442 API Push2Dial \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 pin \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0443.<\/p>\n<p>  API Push2Dial \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Lua. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 memcache \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 lua-resty-memcached \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 Yichun Zhang. \u041a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, lua-resty-memcached, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Lua, \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u0435\u0435, \u0447\u0435\u043c \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f nginx HttpMemcModule, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0438\u043c \u0436\u0435.<\/p>\n<p>  \u041a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 memcache, \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439. \u0412\u043e\u0442 \u0442\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Lua \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u043a\u0443:<\/p>\n<pre><code class=\"lua\">-- \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c memcached memcached = require(&quot;memcached&quot;);  -- \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u043c\u0441\u044f local memc, err = memcached:new(); local connected, err = memc:connect(\u0445\u043e\u0441\u0442, \u043f\u043e\u0440\u0442);  -- \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0434\u043b\u044f \u043f\u0438\u043d-\u043a\u043e\u0434\u0430 \u0442\u043e\u043a\u0435\u043d \u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 -- ttl = 10 \u043c\u0438\u043d\u0443\u0442 memc:set(PIN, json.encode({['token'] = token, ['platform'] = platform}), 600); <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u043b pin-\u043a\u043e\u0434 \u0438 \u0432\u0432\u043e\u0434\u0438\u0442 \u0435\u0433\u043e \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u041e\u0442 \u00ab\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e\u00bb 2\u0413\u0418\u0421 \u0432 API \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u043a\u0438 \u201cpin-&gt;\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u201d. \u0415\u0441\u043b\u0438 \u0442\u0430\u043a\u0430\u044f \u0441\u0432\u044f\u0437\u043a\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u0442\u043e API Push2Dial \u043f\u0435\u0440\u0435\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u0438\u0437 \u043c\u0435\u043c\u043a\u044d\u0448\u0430 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0442\u0434\u0430\u0451\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0443 (\u043e\u043d\u043b\u0430\u0439\u043d\u043e\u0432\u043e\u043c\u0443 \u0438\u043b\u0438 \u043e\u0444\u043b\u0430\u0439\u043d\u043e\u0432\u043e\u043c\u0443 2\u0413\u0418\u0421) \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438\u0437 \u0431\u0430\u0437\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443.<\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043d\u043e\u0432\u043e\u043c 2\u0413\u0418\u0421 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f. \u0415\u0441\u043b\u0438 \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d, \u0442\u043e API Push2Dial \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 id. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437, \u0433\u0434\u0435 \u0431\u044b \u044e\u0437\u0435\u0440 \u043d\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043b\u0441\u044f, \u0435\u0433\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0432\u0441\u0442\u0443\u043f\u0438\u0442 \u0432 \u0441\u0438\u043b\u0443 \u0438 \u043e\u043d \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0437\u0432\u043e\u043d\u043a\u0438. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a.<\/p>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e \u0437\u0432\u043e\u043d\u043a\u0430\u0445. \u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 2\u0413\u0418\u0421 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 ID \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. API P2D \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0432 \u0431\u0430\u0437\u0435 \u044d\u0442\u043e\u0442 ID \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 XML \u0438\u043b\u0438 JSON, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u041a\u043e\u0442\u043e\u0440\u043e\u0435, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 Google \u0438\u043b\u0438 Apple, \u0430 \u043e\u0442\u0442\u0443\u0434\u0430 \u2014 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/981\/659\/c23\/981659c23876b27f5e38db5e6093f9e7.png\"\/><\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043d\u044e\u0430\u043d\u0441. \u041d\u0430 iOS \u043d\u0430\u0431\u043e\u0440 \u043d\u043e\u043c\u0435\u0440\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 2\u0413\u0418\u0421, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u043c\u0435\u0442 \u043d\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435. \u041d\u0430 Android \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0448 \u043a\u043e\u0434 (\u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u0439\u043b\u0435\u0440. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 2\u0413\u0418\u0421 \u043d\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e, \u043e\u043d\u043e \u0438 \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0435 \u043d\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0437\u0432\u043e\u043d\u043e\u043a \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a, \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u041a \u0432\u0430\u0448\u0438\u043c \u0443\u0441\u043b\u0443\u0433\u0430\u043c 2\u0413\u0418\u0421 \u0434\u043b\u044f <a href=\"https:\/\/itunes.apple.com\/ru\/app\/2gis-offlajn-karty-i-spravocniki\/id481627348?mt=8\">iOS<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=ru.dublgis.dgismobile\">Android<\/a>, <a href=\"http:\/\/beta.2gis.ru\/?utm_source=news&amp;utm_medium=habr&amp;utm_campaign=post_p2d\">\u043d\u043e\u0432\u044b\u0439 2\u0413\u0418\u0421<\/a> \u0438 \u0441\u0442\u0430\u0440\u044b\u0439 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439, <a href=\"http:\/\/msk.2gis.ru\/about\/pc\/?utm_source=news&amp;utm_medium=habr&amp;utm_campaign=post_p2d\">2\u0413\u0418\u0421 \u0434\u043b\u044f \u041f\u041a<\/a>.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/2gis\/blog\/209014\/\"> http:\/\/habrahabr.ru\/company\/2gis\/blog\/209014\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u00ab\u0417\u0432\u043e\u043d\u043e\u043a \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a\u00bb \u0438\u043b\u0438 Push2Dial (P2D) \u2014 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0430\u043d\u043e\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0441 \u043d\u043e\u0432\u044b\u043c 2\u0413\u0418\u0421. \u0421\u0443\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0430 \u2014 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044e, \u043a\u043b\u0438\u043a\u0430\u0435\u0442\u0435 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u2014 \u0438 \u043e\u043d \u0433\u043e\u0442\u043e\u0432 \u043a \u043d\u0430\u0431\u043e\u0440\u0443 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0435.<\/p>\n<p>  \u0424\u0438\u0447\u0430 \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0448\u0430\u043d\u0441\u044b \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043d\u0435 \u0442\u0443\u0434\u0430 \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043a \u043d\u0443\u043b\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/667\/72b\/cf6\/66772bcf6bd30647ffba1333f5d31b6b.jpg\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-209014","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/209014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=209014"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/209014\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}