{"id":232037,"date":"2014-08-11T11:25:03","date_gmt":"2014-08-11T07:25:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=232037"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=232037","title":{"rendered":"<span class=\"post_title\">\u041a\u0430\u043a \u043c\u044b \u043f\u0438\u0441\u0430\u043b\u0438 iOS \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Wargaming API<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t<img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/055\/060\/d85\/055060d852be4888922e33ca6f29a5a6.jpg\"\/><\/p>\n<p>  <i><a href=\"https:\/\/itunes.apple.com\/us\/app\/wot-assistant\/id500174696?mt=8\">World of Tanks Assistant <\/a> (WOT Assistant)<\/i> \u0438 <i><a href=\"https:\/\/itunes.apple.com\/us\/app\/world-of-warplanes-assistant\/id739076510?mt=8\">World of Warplanes Assitant <\/a> (WOWP Assistant)<\/i> \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u2013\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d\u044b \u0434\u043b\u044f \u0438\u0433\u0440\u043e\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0432\u043d\u0443\u0442\u0440\u0438\u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0431\u043e\u0435\u0432\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0441 \u0434\u0440\u0443\u0437\u044c\u044f\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0444\u0444\u043b\u0430\u0439\u043d-\u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0435. <br \/>  \u2028WOWP Assistant \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e (\u043d\u043e\u044f\u0431\u0440\u044c 2013), \u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043b\u044f World of Tanks \u0431\u044b\u043b\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u0430 \u043f\u043e\u0447\u0442\u0438 \u0441 \u043d\u0443\u043b\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 2013, \u0447\u0442\u043e \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u043b\u043e \u0441 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u043c \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 <a href=\"http:\/\/ru.wargaming.net\/developers\/documentation\/guide\/getting-started\/\">Wargaming Public API<\/a>. \u2028\u2028\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 iOS-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f <i>Assistant<\/i>\u2019\u043e\u0432 \u0441 API, \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438 \u043f\u043e\u0441\u043b\u0443\u0436\u0430\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430 Wargaming Developers Contest.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/h4>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043c\u043e\u0449\u044c \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0448\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445), \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u0438\u0436\u0435 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0444\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u043d\u0435\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443:<\/p>\n<ul>\n<li>\u0433\u0438\u0431\u043a\u043e\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u00ab\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0445\u00bb \u043e\u0442\u0432\u0435\u0442\u043e\u0432;<\/li>\n<li>\u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0446\u0435\u043f\u043e\u0447\u0435\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432;<\/li>\n<li>\u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f;<\/li>\n<li>\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430\u043c\u0438.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0434\u0435\u0442\u0430\u043b\u044f\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439, \u0441\u0442\u043e\u0438\u0442 \u043a\u0440\u0430\u0442\u043a\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438.<\/p>\n<h5><a href=\"https:\/\/github.com\/AFNetworking\/AFNetworking\">AFNetworking<\/a><\/h5>\n<p>  AFNetworking \u044f\u0432\u043b\u044f\u0442\u0441\u044f \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0425\u043e\u0442\u044c \u0435\u0435 \u00ab\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u00bb \u0438 \u0442\u044f\u043d\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043a\u0443\u0447\u0443 \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0441\u0432\u043e\u044e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c.<\/p>\n<h5><a href=\"https:\/\/github.com\/ReactiveCocoa\/ReactiveCocoa\">ReactiveCocoa<\/a><\/h5>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u0438\u0432\u043d\u043e\u0441\u0438\u0438\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e-\u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043a\u0440\u0430\u0441\u043a\u0438 \u0432 \u043c\u0438\u0440 iOS (<a href=\"http:\/\/habrahabr.ru\/post\/215033\/\">\u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>). \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445\u2013\u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043d\u0442\u0430\u0445. \u041d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u044e\u043d\u0438\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b API (\u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c, \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 \u043f\u0440\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0438\u0436\u0435).<\/p>\n<h5><a href=\"https:\/\/github.com\/Mantle\/Mantle\">Mantle<\/a><\/h5>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0442 iOS \u043a\u043e\u043c\u0430\u043d\u0434\u044b Github, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 web-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 (\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 README \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043d). \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043d\u0443\u0441\u0430 \u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 <code>&lt;NSCoding&gt;<\/code> \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b.<\/p>\n<h5><a href=\"https:\/\/github.com\/kiwi-bdd\/Kiwi\">Kiwi<\/a><\/h5>\n<p>  \u042d\u0442\u043e\u0442 BDD-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 <code>RSpec<\/code>-\u043a\u0430\u0440\u043a\u0430\u0441 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432, \u043c\u043e\u043a\u0438 \u0438 \u043c\u0430\u0442\u0447\u0435\u0440\u044b. \u042d\u0434\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u00ab\u0432\u0441\u0435-\u0432-\u043e\u0434\u043d\u043e\u043c\u00bb.<\/p>\n<h5><a href=\"https:\/\/github.com\/AliSoftware\/OHHTTPStubs\">OHTTPStubs<\/a><\/h5>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0437\u0430\u043c\u0435\u043d\u0438\u043c\u0430, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b web-\u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041a\u043e\u0434 \u0434\u043b\u044f \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u00ab\u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0432\u0435\u043d\u00bb, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0438 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0435 <a href=\"https:\/\/gist.github.com\/garnett\/7267579\">\u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043e\u0431\u0435\u0440\u0442\u043a\u0438<\/a>.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0448\u0438\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c.<\/p>\n<h4>\u0413\u0438\u0431\u043a\u043e\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  <\/p>\n<blockquote><p>There are only two hard things in Computer Science: cache invalidation and naming things.<\/p>\n<p>   \u2014 Phil Karlton<\/p><\/blockquote>\n<p>   \u041f\u043e\u0434 \u00ab\u0433\u0438\u0431\u043a\u0438\u043c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c\u00bb \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:\u2028  <\/p>\n<ul>\n<li>\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432<\/li>\n<li>\u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0430\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435 \u0438 \u0442.\u0434.<\/li>\n<\/ul>\n<p>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u0440\u0435\u043c\u044f \u043a\u044d\u0448\u0430 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c.<br \/>  \u041c\u044b \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u043a\u044d\u0448\u0430 \u2014 \u0431\u044b\u043b\u0430 \u0443 \u043d\u0430\u0441 \u0438 <code> inMemory CoreData<\/code>, \u0431\u044b\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043e\u0431\u044b\u0433\u0440\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>NSCache<\/code>. \u041f\u043e\u0437\u0436\u0435 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u043a\u044d\u0448 \u0445\u043e\u0442\u044c \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u043e\u0439 \u0444\u0438\u0447\u0435\u0439, \u043d\u043e \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u2014 \u0432\u0435\u0441\u044c\u043c\u0430 \u043e\u0431\u044a\u0435\u043c\u043d\u0430 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432\u0441\u0435\u0439 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u043b\u0438 \u0432\u0441\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u044d\u0448\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c <code>NSURLConnection<\/code>.<\/p>\n<h5><a href=\"https:\/\/developer.apple.com\/library\/mac\/documentation\/Cocoa\/Reference\/Foundation\/Classes\/NSURLCache_Class\/Reference\/Reference.html\">NSURLCache<\/a><\/h5>\n<p>  <code>NSURLCache<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0443\u0442\u0435\u043c \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f <code>NSURLRequest<\/code> \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430. \u0425\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, \u0442\u0430\u043a \u0438 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0441\u044c\u043c\u0430 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e: <br \/>  \u2028<\/p>\n<pre><code class=\"objectivec\">NSURLCache *urlCache = [[NSURLCache alloc] initWithMemoryCapacity:kInMemoryCacheSize \t\t\t\t\t\t\t\t\t\t\t         diskCapacity:kOnDiskCacheSize \t\t\t\t\t\t\t\t\t\t\t\t        diskPath:path]; [NSURLCache setSharedURLCache:urlCache]; <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u043e\u043d\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043a\u044d\u0448\u0430.<\/p>\n<p>  \u0423 <code>NSURLConnectionDelegate<\/code> \u0435\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u00ab\u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u00bb \u043e\u0442\u0432\u0435\u0442 \u043f\u0435\u0440\u0435\u0434 \u0435\u0433\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c:<br \/>  \u2028<\/p>\n<pre><code class=\"objectivec\">- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse; <\/code><\/pre>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442?<\/p>\n<pre><code class=\"objectivec\">    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse*)[cachedResponse response];          NSDictionary *headers = [httpResponse allHeaderFields];     NSString *cacheControl = [headers valueForKey:@&quot;Cache-Control&quot;];     NSString *expires = [headers valueForKey:@&quot;Expires&quot;];     if((cacheControl == nil) && (expires == nil)) {         NSMutableDictionary *modifiedHeaders = [httpResponse.allHeaderFields mutableCopy];         NSString *expireDate = [NSDate RFC822StringFromDate:[[NSDate date]                                                              dateByAddingTimeInterval:cacheTime]];         NSDictionary *values = @{@&quot;Expires&quot;: expireDate,                                  @&quot;Cache-Control&quot;: @&quot;public&quot;};         [modifiedHeaders addEntriesFromDictionary:values];                  NSHTTPURLResponse *response =             [[NSHTTPURLResponse alloc] initWithURL:httpResponse.URL                                         statusCode:httpResponse.statusCode                                        HTTPVersion:@&quot;HTTP\/1.1&quot;                                       headerFields:modifiedHeaders];                  NSCachedURLResponse *modifiedCachedResponse =             [[NSCachedURLResponse alloc] initWithResponse:response                                                      data:cachedResponse.data                                                  userInfo:cachedResponse.userInfo                                             storagePolicy:NSURLCacheStorageAllowed];         return modifiedCachedResponse;              }     return cachedResponse;  <\/code><\/pre>\n<p>  \u041d\u0435 \u0431\u0443\u0434\u0443 \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043a\u0440\u0430\u0442\u043a\u043e \u0438\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0441\u0443\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f.\u2028  <\/p>\n<ol>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0438 \u044d\u0442\u043e \u0434\u0430\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0436\u0438\u0437\u043d\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f).<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>cacheTime<\/code>) \u043f\u0443\u0442\u0435\u043c \u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.<\/li>\n<\/ol>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0435\u0441\u044c \u043a\u044d\u0448 \u2014 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043b\u044e\u0431\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 \u043f\u0440\u0438 \u0435\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438). \u041a\u0430\u043a \u0438 \u043b\u044e\u0431\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0437\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u043b\u044e\u0441\u044b \u0438 \u043c\u0438\u043d\u0443\u0441\u044b, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c.<\/p>\n<p>  \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:\u2028<\/p>\n<ul>\n<li>\u043e\u0442\u0432\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0432\u0441\u044e \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435, \u043f\u0430\u0440\u0441\u0438\u043d\u0433, \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0438 \u0442.\u0434.);<\/li>\n<li>\u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u0432 <code>NSURLCache<\/code>, \u0441\u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/li>\n<\/ul>\n<p>  \u0414\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430:<br \/>  \u2028<\/p>\n<ul>\n<li>\u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u044d\u0448 \u0432 30 \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430;<\/li>\n<li>\u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440;<\/li>\n<li>\u0431\u043e\u043d\u0443\u0441: \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0438 \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u043d\u0435 200-\u0439 \u043a\u043e\u0434, <code>NSURLConnection<\/code> \u0432\u0435\u0440\u043d\u0435\u0442 \u0437\u0430\u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u00ab\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0445\u00bb \u043e\u0442\u0432\u0435\u0442\u043e\u0432<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0430\u0442\u0446\u0438\u044e \u043f\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 API (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/ru.wargaming.net\/developers\/api_reference\/wowp\/account\/info\/\">\u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0433\u0440\u043e\u043a\u0430<\/a>), \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0442\u0430\u043c \u043f\u043e\u043b\u0435 <code>fields<\/code>:<\/p>\n<blockquote><p>\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u0435\u0439 \u043e\u0442\u0432\u0435\u0442\u0430. \u041f\u043e\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438. \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u043a\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u043e\u043b\u044f.<\/p><\/blockquote>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442 <code>Player<\/code>, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u043b\u043d\u044b\u0439 JSON-\u0433\u0440\u0430\u0444, \u0442\u0430\u043a \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439. \u041f\u0435\u0440\u0432\u0430\u044f \u0438 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u044f \u0432 \u043a\u043b\u044e\u0447\u0435 <code>fields<\/code>, \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0435\u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 <code>NSDictionary<\/code>. \u2028\u2028\u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f, \u043d\u043e \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438. \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043b\u0435\u0436\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0442\u043e \u0438 \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043c \u0436\u0435.<br \/>  \u2028\u0414\u043b\u044f \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430 <code>JSON -&gt; NSObject<\/code> \u0443 \u043d\u0430\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>Mantle<\/code>, \u0438 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a API \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a (\u043f\u0440\u043e <code>RACSignal<\/code> \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 API \u0432 \u0446\u0435\u043b\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435):<\/p>\n<pre><code class=\"objectivec\">- (RACSignal *)searchPlayers:(NSString *)query limit:(NSUInteger)limit { \tNSMutableDictionary *parameters = [NSMutableDictionary dictionary]; \tparameters[@&quot;search&quot;] = query;         if (limit) parameters[@&quot;limit&quot;] = @(limit); \t \treturn [self getPath:@&quot;account\/list&quot; \t\t\t  parameters:parameters \t\t\t resultClass:WOTSearchPlayer.class]; } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>resultClass<\/code>, \u0442\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 \u043d\u0435 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u0432 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0443 \u043c\u0435\u0442\u043e\u0434\u0430? \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<pre><code class=\"objectivec\"> - (RACSignal *)searchPlayers:(NSString *)query limit:(NSUInteger)limit resultClass:(Class)resultClass <\/code><\/pre>\n<p>  \u0414\u0430, \u0443 \u043d\u0430\u0441 \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 API, \u043d\u043e \u0437\u0430\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0441\u043f\u043e\u0441\u043e\u0431 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<h4>\u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0446\u0435\u043f\u043e\u0447\u0435\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/h4>\n<p>  \u0427\u0430\u0441\u0442\u043e \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 API \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0434\u0432\u0443\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432: \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u0437\u0430\u0442\u0435\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u00ab\u043d\u0435\u043f\u043e\u043b\u043d\u044b\u0439\u00bb \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e. (\u0418\u043d\u043e\u0433\u0434\u0430 \u0442\u0430\u043a\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u044b\u0432\u0430\u0435\u0442 \u0442\u0440\u0438). \u2028\u2028\u0412\u0441\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0440\u0435\u0445 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 (\u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <code>AFJSONRequestOperation<\/code>):<\/p>\n<pre><code class=\"objectivec\">    op1 = [AFJSONRequestOperation JSONRequestOperationWithRequest:nil                                                           success:^(id JSON) {                                                                        op2 = [AFJSONRequestOperation JSONRequestOperationWithRequest:nil                                                               success:^(id JSON) {                          op3 = [AFJSONRequestOperation JSONRequestOperationWithRequest:nil                                                                   success:^(id JSON) {                 \/\/ Combine all the responses and return             } failure:^(NSError *error) {                 \/\/ Handle error             }];         } failure:^(NSError *error) {             \/\/ Handle error         }];     } failure:^(NSError *error) {         \/\/ Handle error     }]; <\/code><\/pre>\n<p>  \u041c\u0430\u043b\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0440\u0430\u0441\u0442\u0435\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u0435\u0449\u0435 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e. \u0412 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u043a\u0430\u043a \u0440\u0430\u0437 \u0438\u0433\u0440\u0430\u043b \u0441 <code>ReactiveCocoa<\/code> \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0431\u044b \u0435\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435.\u2028<br \/>  \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 API \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"objectivec\">- (RACSignal *)searchPlayers:(NSString *)query limit:(NSUInteger)limit; - (RACSignal *)fetchPlayers:(NSArray *)playerIDs; <\/code><\/pre>\n<p>  <code>RACSignal<\/code> \u2014 \u044e\u043d\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u043d\u0438\u0432\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u044f\u0442. \u0422\u0430\u043a \u043a\u0430\u043a \u044e\u043d\u0438\u0442\u044b \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u044f\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043a\u043b\u0435\u0439\u043a\u0438 \u0442\u0440\u0435\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430\/\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<pre><code class=\"objectivec\">    RACSignal *fetchPlayersAndRatings =         [[[[API searchPlayers:@&quot;&quot; limit:0]                      flattenMap:^RACStream *(id players) {             \/\/ skipping data processing             return [API fetchPlayers:@[]];         }]                    flattenMap:^RACStream *(id fullPlayers) {             \/\/ Skipping data processing             return [API statsSliceForPlayer:nil hoursAgo:@[] fields:nil];         }]                    flattenMap:^RACStream *(id value) {             \/\/ Compose all responses here             id composedResponse;             return [RACSignal return:composedResponse];         }];          [fetchPlayersAndRatings subscribeNext:^(id x) {         \/\/ Fully composed response     } error:^(NSError *error) {         \/\/ All erros go to one place     }]; <\/code><\/pre>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>ReactiveCocoa<\/code> \u0438\u043b\u0438 \u043d\u0435\u0442 \u2014 \u0441\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0445\u043e\u043b\u0438\u0432\u0430\u0440\u043e\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u0437\u0430 \u0441\u043a\u043e\u0431\u043a\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u043e\u043b\u0435\u0435 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0434\u043b\u044f Promises \u0438 Futures.<\/p>\n<h4>\u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0447\u0430\u0441\u0442\u0435\u0439:  <\/p>\n<ul>\n<li>Core (\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043f\u0430\u0440\u0441\u0438\u043d\u0433);<\/li>\n<li>WOT (\u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 World of Tanks\u2013\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430\u043c\u0438);<\/li>\n<li>WOWP (\u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 World of Warplanes\u2013\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430\u043c\u0438)<\/li>\n<\/ul>\n<p>  \u041b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u0434 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0430 \u0432\u043e\u0442 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u0447\u0430\u0441\u0442\u044f\u043c\u0438. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 (\u043a\u043e\u0433\u0434\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u043e\u0432) \u043c\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 <a href=\"http:\/\/cocoapods.org\">CocoaPods<\/a>, \u0442\u0430\u043a \u0447\u0442\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0442\u0440\u0443\u0434\u0430. \u2028\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0444\u0438\u0447\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>subspecs<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u0434 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430 \u0442\u0440\u0438 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<pre><code class=\"ruby\">  # Subspecs   s.subspec 'Core' do |cs|     cs.source_files = 'WGNAPIClient\/Core\/**\/*.{h,m}'   end    s.subspec 'WOT' do |cs|     cs.dependency 'WGNAPIClient\/Core'     cs.source_files = 'WGNAPIClient\/WOT\/**\/*.{h,m}'   end    s.subspec 'WOWP' do |cs|     cs.dependency 'WGNAPIClient\/Core'     cs.source_files = 'WGNAPIClient\/WOWP\/**\/*.{h,m}'   end <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00ab\u0442\u0430\u043d\u043a\u043e\u0432\u0443\u044e\u00bb \u0438 \u00ab\u0441\u0430\u043c\u043e\u043b\u0435\u0442\u043d\u0443\u044e\u00bb \u0447\u0430\u0441\u0442\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<br \/>  \u2028<\/p>\n<pre><code class=\"ruby\">pod 'WGNAPIClient\/WOT' pod 'WGNAPIClient\/WOWP' <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430\u043c\u0438<\/h4>\n<p>  \u042f \u0443\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u0440\u043e <a href=\"http:\/\/habrahabr.ru\/post\/164073\/\">\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a> \u0438 <a href=\"http:\/\/habrahabr.ru\/post\/150438\/\">\u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430\u043c\u0438<\/a>. \u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u044d\u0442\u0438 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u2028<br \/>  \u041f\u043e\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u043a\u043e\u0434 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u043e\u043c \u0432\u0435\u0441\u044c\u043c\u0430 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u043c (98%). \u2028\u2028\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0430 \u0432\u0438\u0434\u0430:<\/p>\n<ul>\n<li>\u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430;<\/li>\n<li>\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043c\u043e\u0434\u0435\u043b\u0438.<\/li>\n<\/ul>\n<p>  <\/p>\n<h5>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h5>\n<p>  \u041a\u043e\u0434 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0438\u0436\u0435:<br \/>  \u2028<\/p>\n<pre><code class=\"objectivec\">\tcontext(@&quot;API works with players data&quot;, ^{ \t\tit (@&quot;should search players&quot;, ^{ \t\t\tstubResponse(@&quot;\/wot\/account\/list&quot;, @&quot;players-search.json&quot;); \t\t\tRACSignal *searchRequest = [client searchPlayers:@&quot;garnett&quot; limit:0]; \t\t\tNSArray *response = [searchRequest asynchronousFirstOrDefault:nil success:NULL error:&error];  \t\t\t[[error should] beNil];\t\t\t \t\t\t[[response should] beKindOfClass:NSArray.class]; \t\t\t[[response.lastObject should] beKindOfClass:WOTSearchPlayer.class]; \t\t\tWOTSearchPlayer *player = response[0]; \t\t\t[[player.ID should] equal:@&quot;1785514&quot;]; \t\t});     }); <\/code><\/pre>\n<p>  \u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u043b\u044f\u0441\u043e\u043a \u0441 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c\u044e\/\u0441\u0435\u043c\u0430\u0444\u043e\u0440\u0430\u043c\u0438 \u043d\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 <code>RACSignal<\/code> \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u044e \u0447\u0435\u0440\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430:\u2028\u2028<\/p>\n<pre><code class=\"objectivec\">(id)asynchronousFirstOrDefault:(id)defaultValue success:(BOOL *)success error:(NSError **)error; <\/code><\/pre>\n<p>  <\/p>\n<h5>\u0422\u0435\u0441\u0442 \u043c\u043e\u0434\u0435\u043b\u0438<\/h5>\n<p>  <\/p>\n<pre><code class=\"objectivec\">describe(@&quot;WOTRatingType&quot;, ^{ \tit(@&quot;should parse json to model object&quot;, ^{ \t\tNSDictionary *json = @{ \t\t\t\t\t\t\t   @&quot;threshold&quot;: @5, \t\t\t\t\t\t\t   @&quot;type&quot;: @&quot;1&quot;, \t\t\t\t\t\t\t   @&quot;rank_fields&quot;: @[ \t\t\t\t\t\t\t\t\t   @&quot;xp_amount_rank&quot;, \t\t\t\t\t\t\t\t\t   @&quot;xp_max_rank&quot;, \t\t\t\t\t\t\t\t\t   @&quot;battles_count_rank&quot;, \t\t\t\t\t\t\t\t\t   @&quot;spotted_count_rank&quot;, \t\t\t\t\t\t\t\t\t   @&quot;damage_dealt_rank&quot;, \t\t\t\t\t\t\t\t\t   ] \t\t\t\t\t\t\t   }; \t\t \t\tNSError *error; \t\tWOTRatingType *ratingType = [MTLJSONAdapter modelOfClass:WOTRatingType.class                                               fromJSONDictionary:json                                                            error:&error]; \t\t \t\t[[error should] beNil]; \t\t[[ratingType should] beKindOfClass:WOTRatingType.class]; \t\t \t\t[[json[@&quot;threshold&quot;] should] equal:theValue(ratingType.threshold)]; * \t\t[[json[@&quot;type&quot;] should] equal:ratingType.type]; \t\t[[ratingType.rankFields shouldNot] beNil]; \t\t[[ratingType.rankFields should] beKindOfClass:NSArray.class]; \t\t[[ratingType.rankFields should] haveCountOf:5]; \t\t \t\t[[@&quot;maximumXP&quot; should] equal:ratingType.rankFields[1]]; \t}); }); <\/code><\/pre>\n<p>  * \u2014 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0419\u043e\u0434\u0430-\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0438\u0437-\u0437\u0430 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0433\u043e \u0431\u0430\u0433\u0430 \u0432 Kiwi, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0432\u043d\u043e <code>nil<\/code>.<\/p>\n<p>  \u0412\u043e\u0440\u043a\u0444\u043b\u043e\u0443 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 API \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0448\u0430\u0433\u043e\u0432:<br \/>  \u2028<\/p>\n<ol>\n<li>\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0438 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441;<\/li>\n<li>\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0432\u0430 \u0442\u0435\u0441\u0442\u0430.<\/li>\n<\/ol>\n<p>  \u0412 \u043f\u043e\u0434\u0445\u043e\u0434\u0435, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435, \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0432\u0435\u0441\u044c\u043c\u0430 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u0438 \u043d\u0435\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043e\u043a: \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 query \u0434\u043b\u044f http-\u0437\u0430\u043f\u0440\u043e\u0441\u0430.<code>&lt;irony&gt;\u0422\u0438\u043a\u0435\u0442 \u0437\u0430\u0432\u0435\u0434\u0435\u043d&lt;\/irony&gt;<\/code><\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430\u044f \u043d\u0430\u0434 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439, \u044f \u043e\u0447\u0435\u043d\u044c \u043f\u043b\u043e\u0442\u043d\u043e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0441\u044f \u0441 <code>ReactiveCocoa<\/code>, \u0438 \u044d\u0442\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e \u043c\u043e\u044e \u0436\u0438\u0437\u043d\u044c (\u043d\u043e \u044d\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f). \u041e\u0431\u044a\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 (\u0432\u0441\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438) \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 2k LOC (\u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 ~1k \u2014 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u0430 \u0435\u0449\u0435 ~700 \u2014 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u043a\u043e\u0434 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432), \u0447\u0442\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442: \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0431\u043e\u044f\u0442\u044c\u0441\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0438 \u0444\u0440\u044d\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u2014 \u043f\u0440\u0438 \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u043c \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043d\u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0436\u0438\u0437\u043d\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.      \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\/wargaming\/blog\/232037\/\"> http:\/\/habrahabr.ru\/company\/wargaming\/blog\/232037\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t<img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/055\/060\/d85\/055060d852be4888922e33ca6f29a5a6.jpg\"\/><\/p>\n<p>  <i><a href=\"https:\/\/itunes.apple.com\/us\/app\/wot-assistant\/id500174696?mt=8\">World of Tanks Assistant <\/a> (WOT Assistant)<\/i> \u0438 <i><a href=\"https:\/\/itunes.apple.com\/us\/app\/world-of-warplanes-assistant\/id739076510?mt=8\">World of Warplanes Assitant <\/a> (WOWP Assistant)<\/i> \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u2013\u043a\u043e\u043c\u043f\u0430\u043d\u044c\u043e\u043d\u044b \u0434\u043b\u044f \u0438\u0433\u0440\u043e\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0432\u043d\u0443\u0442\u0440\u0438\u0438\u0433\u0440\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0431\u043e\u0435\u0432\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0441 \u0434\u0440\u0443\u0437\u044c\u044f\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u0444\u0444\u043b\u0430\u0439\u043d-\u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u0435\u0445\u043d\u0438\u043a\u0435. <br \/>  \u2028WOWP Assistant \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e (\u043d\u043e\u044f\u0431\u0440\u044c 2013), \u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043b\u044f World of Tanks \u0431\u044b\u043b\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u0430 \u043f\u043e\u0447\u0442\u0438 \u0441 \u043d\u0443\u043b\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 2013, \u0447\u0442\u043e \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u043b\u043e \u0441 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u043c \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 <a href=\"http:\/\/ru.wargaming.net\/developers\/documentation\/guide\/getting-started\/\">Wargaming Public API<\/a>. \u2028\u2028\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 iOS-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f <i>Assistant<\/i>\u2019\u043e\u0432 \u0441 API, \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438 \u043f\u043e\u0441\u043b\u0443\u0436\u0430\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u0430 Wargaming Developers Contest.  <\/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-232037","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/232037","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=232037"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/232037\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=232037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=232037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=232037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}