{"id":283416,"date":"2017-01-05T13:30:04","date_gmt":"2017-01-05T10:30:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=283416"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=283416","title":{"rendered":"\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 API \u043e\u0442 Vk \u0434\u043b\u044f \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432 \u043d\u0430 Elixir"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8d2\/1e5\/d3e\/8d21e5d3ecd54575bb046e6de4e3e1d3.jpg\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0412\u043e \u0412\u043a \u0435\u0441\u0442\u044c \u043d\u0430\u0431\u043e\u0440\u044b \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0430\u0436\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435. \u041d\u043e \u0432\u043e \u0412\u043a \u043d\u0435\u0442 \u043d\u0438 \u043a\u0430\u043a\u043e\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e <em>API<\/em> \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0430\u0439\u0442\u0430. \u0417\u0430\u0434\u0430\u0447\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u044f\u0437\u044b\u043a <em>Elixir<\/em> \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043d\u0430\u0434 \u043c\u0435\u0441\u0442\u043e\u043c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432 \u0432\u043e \u0412\u043a \u0432 \u0432\u0438\u0434\u0435 <em>API<\/em>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e \u0438\u043c\u0435\u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0438 \u0431\u044b\u043b\u0438 \u0431\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438. \u041e\u0431\u0449\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u0438\u043c\u0451\u043d \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 <em>API<\/em> \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0438\u043a\u0435\u0440\u0430\u043c\u0438 \u0431\u044b\u043b\u043e \u0431\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>stickers<\/code>, \u0430 \u0441\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u0431\u044b \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<p><code>stickers.get<\/code> \u2014 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438: <code>pack_ids<\/code>, <code>pack_id<\/code>, <code>fields<\/code>;<br \/>  <code>stickers.getById<\/code> \u2014 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438: <code>sticker_ids<\/code>, <code>sticker_id<\/code>, <code>fields<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0438\u043a\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432\u043e \u0412\u043a, \u0434\u0430\u043d\u043d\u043e\u0435 <em>API<\/em> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e <em>read-only<\/em> \u043c\u0435\u0442\u043e\u0434\u044b. \u0427\u0435\u0441\u0442\u043d\u043e, \u0441\u043b\u043e\u0436\u043d\u043e \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0442\u044c, \u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0440\u0430\u0436\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0443\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u043c\u0451\u043d \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0418 \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c <em>API<\/em> \u0432 \u0441\u0442\u0438\u043b\u0435 \u0412\u043a, \u0445\u043e\u0442\u044c \u044d\u0442\u043e \u0431\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u043e \u043e\u0431\u0449\u0435\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u0443\u0434\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0438\u043a\u0435\u0440\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043d\u0430\u0431\u043e\u0440\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code>GET \/packs GET \/packs\/{id} GET \/packs\/{id}\/stickers<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code>GET \/stickers GET \/stickers\/{id} GET \/stickers\/{id}\/pack<\/code><\/pre>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"realizaciya\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432\u044b\u0448\u0435, \u044f\u0437\u044b\u043a\u043e\u043c \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d <em>Elixir<\/em>. \u0411\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c <em>PostgreSQL<\/em> \u0438 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043d\u0435\u0439 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b <code>Postgrex<\/code> \u0438 <code>Ecto<\/code>. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 web-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d <code>Cowboy<\/code>. \u0417\u0430 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <em>json<\/em>-\u0444\u043e\u0440\u043c\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c <code>Poison<\/code>. \u0412\u0441\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435 \u043e\u0431\u044a\u0451\u043c\u043d\u0430\u044f \u0438 \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u0430\u044f, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 <code>Phoenix<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>mix new api_vk_stickers<\/code>, \u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f <em>API<\/em> \u0412\u043a.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b <code>mix.exs<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439:<\/p>\n<p>  <\/p>\n<pre><code># mix.exs  defmodule ApiVkStickers.Mixfile do   use Mix.Project    # ...    defp deps do     [{:postgrex, &quot;~&gt; 0.13&quot;},      {:ecto, &quot;~&gt; 2.1.1&quot;},      {:cowboy, &quot;~&gt; 1.0.4&quot;},      {:plug, &quot;~&gt; 1.1.0&quot;},      {:poison, &quot;~&gt; 3.0&quot;}]   end end<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0445 \u0432\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>mix deps.get<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043b\u043e\u0433\u0438\u043a\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<\/p>\n<p>  <\/p>\n<pre><code>models\/   pack.ex   sticker.ex decorators\/   pack_decorator.ex   sticker_decorator.ex encoders\/   packs_encoder.ex   stickers_encoder.ex finders\/   packs_finder.ex   stickers_finder.ex parsers\/   ids_param_parser.ex controllers\/   packs_controller.ex   stickers_controller.ex router.ex<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"models\">models<\/h3>\n<p>  <\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044f <code>Ecto.Schema<\/code>. \u0412 \u043c\u043e\u0434\u0435\u043b\u0438 <code>Pack<\/code> \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u043e\u043b\u0435\u043c <code>title<\/code> \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <code>schema\/2<\/code>, \u043a\u0430\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043e\u043d\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u043c\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041f\u043e\u043b\u044f \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u0435\u043b\u0435 <code>schema\/2<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <code>filed\/3<\/code>. <code>filed\/3<\/code> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044f, \u0442\u0438\u043f \u043f\u043e\u043b\u044f (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <code>:string<\/code>) \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <code>[]<\/code>).<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u044f\u0437\u0438 \u043e\u0434\u0438\u043d-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>has_many\/3<\/code>.<\/p>\n<p>  <\/p>\n<pre><code># pack.ex  defmodule ApiVkStickers.Pack do   use Ecto.Schema    schema &quot;packs&quot; do     field :title     field :author     field :slug      has_many :stickers, ApiVkStickers.Sticker   end end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043e\u0434\u0438\u043d-\u043a-\u043e\u0434\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>belongs_to\/3<\/code>.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 Sticker<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code># sticker.ex  defmodule ApiVkStickers.Sticker do   use Ecto.Schema    schema &quot;stickers&quot; do     field :src, :map, virtual: true      belongs_to :pack, ApiVkStickers.Pack   end end<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3 id=\"decorators\">decorators<\/h3>\n<p>  <\/p>\n<p>\u0412 \u042d\u043b\u0438\u043a\u0441\u0438\u0440\u0435 \u043f\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0435\u0442, \u043d\u043e \u0432\u0441\u0451 \u0436\u0435 \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0430 \u0432 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u0441 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c <code>_decorator<\/code>. <em>API<\/em> \u043d\u0430 \u0440\u043e\u0432\u043d\u0435 \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432. \u0414\u043b\u044f \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u043e\u0431\u043b\u043e\u0436\u0435\u043a \u0432 \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u0438 <em>url<\/em> \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432\u043e \u0412\u043a.<\/p>\n<p>  <\/p>\n<pre><code># pack_decorator.ex  defmodule ApiVkStickers.PackDecorator do   @storage_url &quot;https:\/\/vk.com\/images\/store\/stickers&quot;   @shop_url &quot;https:\/\/vk.com\/stickers&quot;    def source_urls(pack) do     id = pack.id      %{small: &quot;#{@storage_url}\/#{id}\/preview1_296.jpg&quot;,       large: &quot;#{@storage_url}\/#{id}\/preview1_592.jpg&quot;}   end    def showcase_url(pack) do     &quot;#{@shop_url}\/#{pack.slug}&quot;   end end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u0445.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 StickerDecorator<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code># sticker_decorator.ex  defmodule ApiVkStickers.StickerDecorator do   @storage_url &quot;https:\/\/vk.com\/images\/stickers&quot;    def source_urls(sticker) do     id = sticker.id      %{thumb: &quot;#{@storage_url}\/#{id}\/64.png&quot;,       small: &quot;#{@storage_url}\/#{id}\/128.png&quot;,       medium: &quot;#{@storage_url}\/#{id}\/256.png&quot;,       large: &quot;#{@storage_url}\/#{id}\/512.png&quot;}   end end<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3 id=\"encoders\">encoders<\/h3>\n<p>  <\/p>\n<p>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b \u0437\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432 <em>json<\/em>-\u0444\u043e\u0440\u043c\u0430\u0442. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0438\u0437 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u044d\u043a\u0441\u0442\u0440\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432 <em>JSON<\/em> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0443\u043b\u044f <code>Poison.Encoder.Map<\/code>. \u041c\u043e\u0434\u0443\u043b\u044c <code>PacksEncoder<\/code> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <code>call\/1<\/code>.<\/p>\n<p>  <\/p>\n<pre><code># packs_encoder.ex  defmodule ApiVkStickers.PacksEncoder do   alias ApiVkStickers.PackDecorator    defimpl Poison.Encoder, for: ApiVkStickers.Pack do     def encode(pack, options) do       Map.take(pack, [:id, :title, :author])       |&gt; Map.put(:source_urls, PackDecorator.source_urls(pack))       |&gt; Map.put(:showcase_url, PackDecorator.showcase_url(pack))       |&gt; Poison.Encoder.Map.encode(options)     end   end    def call(stickers) do     Poison.encode!(stickers)   end end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u0435\u043d.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 StickersEncoder<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code># stickers_encoder.ex  defmodule ApiVkStickers.StickersEncoder do   alias ApiVkStickers.StickerDecorator    defimpl Poison.Encoder, for: ApiVkStickers.Sticker do     def encode(sticker, options) do       Map.take(sticker, [:id, :pack_id])       |&gt; Map.put(:source_urls, StickerDecorator.source_urls(sticker))       |&gt; Poison.Encoder.Map.encode(options)     end   end    def call(stickers) do     Poison.encode!(stickers)   end end<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3 id=\"finders\">finders<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445, \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0444\u0430\u0439\u043d\u0434\u0435\u0440\u044b (\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435, \u0438\u0441\u043a\u0430\u0442\u0435\u043b\u0438). \u0418\u0445 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0434\u0432\u0430, \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u0424\u0430\u0439\u043d\u0434\u0435\u0440 \u043f\u043e \u043d\u0430\u0431\u043e\u0440\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u0440\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: <code>all\/1<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043d\u0430\u0431\u043e\u0440\u043e\u0432, <code>one\/1<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0438 <code>by_ids\/1<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c <code>id<\/code>.<\/p>\n<p>  <\/p>\n<pre><code># packs_finder.ex  defmodule ApiVkStickers.PacksFinder do   import Ecto.Query    alias ApiVkStickers.{Repo, Pack}    def all(query \\\\ Pack) do     Repo.all(from p in query, order_by: p.id)   end    def one(id) do     Repo.get(Pack, id)   end    def by_ids(ids) do     all(from p in Pack, where: p.id in ^ids)   end end<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043d\u0434\u0435\u0440 \u043f\u043e \u0441\u0442\u0438\u043a\u0435\u0440\u0430\u043c, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>by_pack_id\/1<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432 \u043d\u0435 \u043f\u043e \u0438\u0445 <code>id<\/code>, \u0430 \u043f\u043e \u0438\u0445 <code>pack_id<\/code>.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 StickersFinder<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code># stickers_finder.ex  defmodule ApiVkStickers.StickersFinder do   import Ecto.Query    alias ApiVkStickers.{Repo, Sticker}    def all(query \\\\ Sticker) do     Repo.all(from s in query, order_by: s.id)   end    def one(id) do     Repo.get(Sticker, id)   end    def by_pack_ids(pack_ids) do     all(from s in Sticker, where: s.pack_id in ^pack_ids)   end end<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h3 id=\"parsers\">parsers<\/h3>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043d\u0435 \u0431\u044b\u043b\u0430 \u043f\u043e\u0437\u043d\u0430\u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 <em>url<\/em> <em>GET<\/em>-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b <code>Plug<\/code> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u043b \u043c\u043d\u0435 \u043c\u0430\u0441\u0441\u0438\u0432. \u0418 \u0432\u043e\u043e\u0431\u0449\u0435 \u043a\u0430\u043a-\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 <code>id<\/code> \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438 <code>get\/3<\/code> \u043c\u043e\u0434\u0443\u043b\u044f <code>Plug.Router<\/code>.<\/p>\n<p>  <\/p>\n<pre><code># ids_param_parser.ex  defmodule ApiVkStickers.IdsParamParser do   def call(query_string, param_name \\\\ &quot;ids&quot;) do     ids = Plug.Conn.Query.decode(query_string)[param_name]      if ids do       String.split(ids, &quot;,&quot;)     end   end end<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"controllers\">controllers<\/h3>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u043e\u0434\u0443\u043b\u044f <code>Plug.Router<\/code>, <em>DSL<\/em> \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043d\u043e\u0433\u0438\u043c \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a <em>Sinatra<\/em>. \u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0441\u0430\u043c\u0438\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 router.ex<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>defmodule ApiVkStickers.Router do   use Plug.Router    plug Plug.Logger   plug :match   plug :dispatch    forward &quot;\/packs&quot;, to: ApiVkStickers.PacksController   forward &quot;\/stickers&quot;, to: ApiVkStickers.StickersController    match _ do     conn     |&gt; put_resp_content_type(&quot;application\/json&quot;)     |&gt; send_resp(404, ~s{&quot;error&quot;:&quot;not found&quot;}))   end end<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u043f\u043e \u0441\u0443\u0442\u0438 \u0434\u0435\u043b\u0430 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0442\u0430\u043a\u0438\u043c\u0438 \u0436\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u043d\u043e \u0432 \u0434\u0443\u0448\u0435 \u0435\u0441\u0442\u044c \u0432\u0435\u0440\u0430, \u0432 \u0442\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u043f\u0430\u043f\u043a\u0443 <code>controllers<\/code> \u0431\u044b\u043b\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<pre><code># packs_controller  defmodule ApiVkStickers.PacksController do   # ...    get &quot;\/&quot; do     ids = IdsParamParser.call(conn.query_string)      packs = if ids do               PacksFinder.by_ids(ids)             else               PacksFinder.all             end       |&gt; PacksEncoder.call      send_json_resp(conn, packs)   end    get &quot;\/:id&quot; do     pack = PacksFinder.one(id)            |&gt; PacksEncoder.call      send_json_resp(conn, pack)   end    get &quot;\/:id\/stickers&quot; do     stickers = StickersFinder.by_pack_ids([id])                |&gt; StickersEncoder.call      send_json_resp(conn, stickers)   end    # ... end<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 StickersController<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code># stickers_controller  defmodule ApiVkStickers.StickersController do   # ...    get &quot;\/&quot; do     pack_ids = IdsParamParser.call(conn.query_string, &quot;pack_ids&quot;)      stickers = if pack_ids do                  StickersFinder.by_pack_ids(pack_ids)                else                  StickersFinder.all                end       |&gt; StickersEncoder.call      send_json_resp(conn, stickers)   end    get &quot;\/:id&quot; do     sticker = StickersFinder.one(id)               |&gt; StickersEncoder.call      send_json_resp(conn, sticker)   end    get &quot;\/:id\/pack&quot; do     sticker = StickersFinder.one(id)      pack = PacksFinder.one(sticker.pack_id)            |&gt; PacksEncoder.call      send_json_resp(conn, pack)   end    # ... end<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h2 id=\"rezultat\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h2>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">$ curl -X GET &#8212;header &#39;Accept: application\/json&#39; &#39;http:\/\/localhost:4000\/packs&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>[{&quot;title&quot;:&quot;\u0421\u043f\u043e\u0442\u0442\u0438&quot;, &quot;source_urls&quot;:{&quot;small&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/1\/preview1_296.jpg&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/1\/preview1_592.jpg&quot;}, &quot;showcase_url&quot;:&quot;https:\/\/vk.com\/stickers\/spotty&quot;, &quot;id&quot;:1,&quot;author&quot;:&quot;\u0410\u043d\u0434\u0440\u0435\u0439 \u042f\u043a\u043e\u0432\u0435\u043d\u043a\u043e&quot;}, {&quot;title&quot;:&quot;\u041f\u0435\u0440\u0441\u0438\u043a&quot;, &quot;source_urls&quot;:{&quot;small&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/2\/preview1_296.jpg&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/2\/preview1_592.jpg&quot;}, &quot;showcase_url&quot;:&quot;https:\/\/vk.com\/stickers\/persik&quot;, &quot;id&quot;:2,&quot;author&quot;:&quot;\u0415\u043b\u0435\u043d\u0430 \u0421\u0430\u0432\u0447\u0435\u043d\u043a\u043e&quot;}, {&quot;title&quot;:&quot;\u0421\u043c\u0430\u0439\u043b\u044b&quot;, &quot;source_urls&quot;:{&quot;small&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/3\/preview1_296.jpg&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/3\/preview1_592.jpg&quot;}, &quot;showcase_url&quot;:&quot;https:\/\/vk.com\/stickers\/smilies&quot;, &quot;id&quot;:3,&quot;author&quot;:&quot;\u0415\u043b\u0435\u043d\u0430 \u0421\u0430\u0432\u0447\u0435\u043d\u043a\u043e&quot;}, {&quot;title&quot;:&quot;\u0424\u0440\u0443\u043a\u0442\u043e\u0432\u043e\u0449\u0438&quot;, &quot;source_urls&quot;:{&quot;small&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/4\/preview1_296.jpg&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/4\/preview1_592.jpg&quot;}, &quot;showcase_url&quot;:&quot;https:\/\/vk.com\/stickers\/fruitables&quot;, &quot;id&quot;:4,&quot;author&quot;:&quot;\u0410\u043d\u0434\u0440\u0435\u0439 \u042f\u043a\u043e\u0432\u0435\u043d\u043a\u043e&quot;}]<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">$ curl -X GET &#8212;header &#39;Accept: application\/json&#39; &#39;http:\/\/localhost:4000\/packs\/?ids=2,3&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>[{&quot;title&quot;:&quot;\u041f\u0435\u0440\u0441\u0438\u043a&quot;, &quot;source_urls&quot;:{&quot;small&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/2\/preview1_296.jpg&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/2\/preview1_592.jpg&quot;},&quot;showcase_url&quot;:&quot;https:\/\/vk.com\/stickers\/persik&quot;, &quot;id&quot;:2,&quot;author&quot;:&quot;\u0415\u043b\u0435\u043d\u0430 \u0421\u0430\u0432\u0447\u0435\u043d\u043a\u043e&quot;}, {&quot;title&quot;:&quot;\u0421\u043c\u0430\u0439\u043b\u044b&quot;, &quot;source_urls&quot;:{&quot;small&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/3\/preview1_296.jpg&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/3\/preview1_592.jpg&quot;},&quot;showcase_url&quot;:&quot;https:\/\/vk.com\/stickers\/smilies&quot;, &quot;id&quot;:3,&quot;author&quot;:&quot;\u0415\u043b\u0435\u043d\u0430 \u0421\u0430\u0432\u0447\u0435\u043d\u043a\u043e&quot;}]<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">$ curl -X GET &#8212;header &#39;Accept: application\/json&#39; &#39;http:\/\/localhost:4000\/packs\/1&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>{&quot;title&quot;:&quot;\u0421\u043f\u043e\u0442\u0442\u0438&quot;, &quot;source_urls&quot;:{&quot;small&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/1\/preview1_296.jpg&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/1\/preview1_592.jpg&quot;}, &quot;showcase_url&quot;:&quot;https:\/\/vk.com\/stickers\/spotty&quot;, &quot;id&quot;:1,&quot;author&quot;:&quot;\u0410\u043d\u0434\u0440\u0435\u0439 \u042f\u043a\u043e\u0432\u0435\u043d\u043a\u043e&quot;}<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">$ curl -X GET &#8212;header &#39;Accept: application\/json&#39; &#39;http:\/\/localhost:4000\/packs\/1\/stickers&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>[{&quot;source_urls&quot;:{&quot;thumb&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/64.png&quot;, &quot;small&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/128.png&quot;, &quot;medium&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/256.png&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/512.png&quot;}, &quot;pack_id&quot;:1,&quot;id&quot;:1},...,{&quot;source_urls&quot;:{&quot;thumb&quot;:&quot;https:\/\/vk.com\/images\/stickers\/48\/64.png&quot;, &quot;small&quot;:&quot;https:\/\/vk.com\/images\/stickers\/48\/128.png&quot;, &quot;medium&quot;:&quot;https:\/\/vk.com\/images\/stickers\/48\/256.png&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/stickers\/48\/512.png&quot;}, &quot;pack_id&quot;:1,&quot;id&quot;:48}]<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">$ curl -X GET &#8212;header &#39;Accept: application\/json&#39; &#39;http:\/\/localhost:4000\/stickers&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>[{&quot;source_urls&quot;:{&quot;thumb&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/64.png&quot;, &quot;small&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/128.png&quot;, &quot;medium&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/256.png&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/512.png&quot;}, &quot;pack_id&quot;:1,&quot;id&quot;:1}, {&quot;source_urls&quot;:{&quot;thumb&quot;:&quot;https:\/\/vk.com\/images\/stickers\/2\/64.png&quot;, &quot;small&quot;:&quot;https:\/\/vk.com\/images\/stickers\/2\/128.png&quot;, &quot;medium&quot;:&quot;https:\/\/vk.com\/images\/stickers\/2\/256.png&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/stickers\/2\/512.png&quot;}, &quot;pack_id&quot;:1,&quot;id&quot;:2}, {&quot;source_urls&quot;:{&quot;thumb&quot;:&quot;https:\/\/vk.com\/images\/stickers\/3\/64.png&quot;, &quot;small&quot;:&quot;https:\/\/vk.com\/images\/stickers\/3\/128.png&quot;, &quot;medium&quot;:&quot;https:\/\/vk.com\/images\/stickers\/3\/256.png&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/stickers\/3\/512.png&quot;}, &quot;pack_id&quot;:1,&quot;id&quot;:3},...,{&quot;source_urls&quot;:{&quot;thumb&quot;:&quot;https:\/\/vk.com\/images\/stickers\/167\/64.png&quot;, &quot;small&quot;:&quot;https:\/\/vk.com\/images\/stickers\/167\/128.png&quot;, &quot;medium&quot;:&quot;https:\/\/vk.com\/images\/stickers\/167\/256.png&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/stickers\/167\/512.png&quot;}, &quot;pack_id&quot;:4,&quot;id&quot;:167}, {&quot;source_urls&quot;:{&quot;thumb&quot;:&quot;https:\/\/vk.com\/images\/stickers\/168\/64.png&quot;, &quot;small&quot;:&quot;https:\/\/vk.com\/images\/stickers\/168\/128.png&quot;, &quot;medium&quot;:&quot;https:\/\/vk.com\/images\/stickers\/168\/256.png&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/stickers\/168\/512.png&quot;}, &quot;pack_id&quot;:4,&quot;id&quot;:168}]<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">$ curl -X GET &#8212;header &#39;Accept: application\/json&#39; &#39;http:\/\/localhost:4000\/stickers\/?pack_ids=2,3&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>[{&quot;source_urls&quot;:{&quot;thumb&quot;:&quot;https:\/\/vk.com\/images\/stickers\/49\/64.png&quot;, &quot;small&quot;:&quot;https:\/\/vk.com\/images\/stickers\/49\/128.png&quot;, &quot;medium&quot;:&quot;https:\/\/vk.com\/images\/stickers\/49\/256.png&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/stickers\/49\/512.png&quot;},&quot;pack_id&quot;:2,&quot;id&quot;:49}, ..., {&quot;source_urls&quot;:{&quot;thumb&quot;:&quot;https:\/\/vk.com\/images\/stickers\/128\/64.png&quot;, &quot;small&quot;:&quot;https:\/\/vk.com\/images\/stickers\/128\/128.png&quot;, &quot;medium&quot;:&quot;https:\/\/vk.com\/images\/stickers\/128\/256.png&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/stickers\/128\/512.png&quot;},&quot;pack_id&quot;:3,&quot;id&quot;:128}]<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">$ curl -X GET &#8212;header &#39;Accept: application\/json&#39; &#39;http:\/\/localhost:4000\/stickers\/1&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>{&quot;source_urls&quot;:{&quot;thumb&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/64.png&quot;, &quot;small&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/128.png&quot;, &quot;medium&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/256.png&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/stickers\/1\/512.png&quot;}, &quot;pack_id&quot;:1,&quot;id&quot;:1}<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">$ curl -X GET &#8212;header &#39;Accept: application\/json&#39; &#39;http:\/\/localhost:4000\/stickers\/1\/pack&#39;<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>{&quot;title&quot;:&quot;\u0421\u043f\u043e\u0442\u0442\u0438&quot;, &quot;source_urls&quot;:{&quot;small&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/1\/preview1_296.jpg&quot;, &quot;large&quot;:&quot;https:\/\/vk.com\/images\/store\/stickers\/1\/preview1_592.jpg&quot;}, &quot;showcase_url&quot;:&quot;https:\/\/vk.com\/stickers\/spotty&quot;, &quot;id&quot;:1,&quot;author&quot;:&quot;\u0410\u043d\u0434\u0440\u0435\u0439 \u042f\u043a\u043e\u0432\u0435\u043d\u043a\u043e&quot;}<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h2 id=\"posleslovie\">\u041f\u043e\u0441\u043b\u0435\u0441\u043b\u043e\u0432\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0418\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c <em>PostgreSQL<\/em>. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043d\u0430\u0431\u043e\u0440\u0430\u0445 \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0445 \u0438\u043c \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432. \u041f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0441\u044f, \u043d\u043e \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b \u0443\u0436\u0435 \u043d\u0435 \u0443\u0442\u043a\u043d\u0451\u0442\u0435\u0441\u044c \u0442\u043e\u0447\u043d\u043e.<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f <em>Elixir<\/em> \u0438\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0442\u043e \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0432\u0430\u043c \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a <a href=\"https:\/\/telegram.me\/proelixir\">Telegram-\u043a\u0430\u043d\u0430\u043b\u0443<\/a> \u043f\u0440\u043e <em>Elixir<\/em>.<\/li>\n<li>\u0423 \u043e\u0442\u0435\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e <em>Elixir<\/em> \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0435\u0434\u0438\u043d\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0430 \u0432 \u043b\u0438\u0446\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"http:\/\/wunsh.ru\">Wunsh.ru<\/a>. \u0421\u0435\u0439\u0447\u0430\u0441 \u0440\u0435\u0431\u044f\u0442\u0430 \u0432\u043e \u0432\u0441\u044e \u043f\u0438\u0448\u0443\u0442 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0430\u0439\u0442\u0430. \u041d\u043e \u0443\u0436\u0435 \u0443 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0430 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443. \u0412 \u043d\u0435\u0439 \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u043b\u0435\u0433\u0430\u043b\u044c\u043d\u043e\u0433\u043e, \u0440\u0430\u0437 \u0432 \u043d\u0435\u0434\u0435\u043b\u044c\u043a\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u043e \u0441 \u043f\u043e\u0434\u0431\u043e\u0440\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e <em>Elixir<\/em> \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0435\u043c\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 <em>Elixir<\/em>, \u043c\u043e\u0433\u0443 \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e: <a href=\"https:\/\/habrahabr.ru\/post\/317444\/\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Elixir-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041e\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/a>.<\/p>\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=\"https:\/\/habrahabr.ru\/post\/318918\/\"> https:\/\/habrahabr.ru\/post\/318918\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8d2\/1e5\/d3e\/8d21e5d3ecd54575bb046e6de4e3e1d3.jpg\" alt=\"image\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0412\u043e \u0412\u043a \u0435\u0441\u0442\u044c \u043d\u0430\u0431\u043e\u0440\u044b \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u0430\u0436\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435. \u041d\u043e \u0432\u043e \u0412\u043a \u043d\u0435\u0442 \u043d\u0438 \u043a\u0430\u043a\u043e\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e <em>API<\/em> \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0430\u0439\u0442\u0430. \u0417\u0430\u0434\u0430\u0447\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u044f\u0437\u044b\u043a <em>Elixir<\/em> \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043d\u0430\u0434 \u043c\u0435\u0441\u0442\u043e\u043c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432 \u0432\u043e \u0412\u043a \u0432 \u0432\u0438\u0434\u0435 <em>API<\/em>.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e \u043c\u043e\u0435\u043c\u0443 \u043c\u043d\u0435\u043d\u0438\u044e \u0438\u043c\u0435\u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0438 \u0431\u044b\u043b\u0438 \u0431\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438. \u041e\u0431\u0449\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u0438\u043c\u0451\u043d \u0434\u043b\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 <em>API<\/em> \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0438\u043a\u0435\u0440\u0430\u043c\u0438 \u0431\u044b\u043b\u043e \u0431\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>stickers<\/code>, \u0430 \u0441\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u0431\u044b \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<p><code>stickers.get<\/code> \u2014 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438: <code>pack_ids<\/code>, <code>pack_id<\/code>, <code>fields<\/code>;<br \/>  <code>stickers.getById<\/code> \u2014 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438: <code>sticker_ids<\/code>, <code>sticker_id<\/code>, <code>fields<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0438\u043a\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432\u043e \u0412\u043a, \u0434\u0430\u043d\u043d\u043e\u0435 <em>API<\/em> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e <em>read-only<\/em> \u043c\u0435\u0442\u043e\u0434\u044b. \u0427\u0435\u0441\u0442\u043d\u043e, \u0441\u043b\u043e\u0436\u043d\u043e \u0443\u0433\u0430\u0434\u044b\u0432\u0430\u0442\u044c, \u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0440\u0430\u0436\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0443\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u043c\u0451\u043d \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0418 \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c <em>API<\/em> \u0432 \u0441\u0442\u0438\u043b\u0435 \u0412\u043a, \u0445\u043e\u0442\u044c \u044d\u0442\u043e \u0431\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u043e \u043e\u0431\u0449\u0435\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u0443\u0434\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0438\u043a\u0435\u0440\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043d\u0430\u0431\u043e\u0440\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code>GET \/packs GET \/packs\/{id} GET \/packs\/{id}\/stickers<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code>GET \/stickers GET \/stickers\/{id} GET \/stickers\/{id}\/pack<\/code><\/pre>\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-283416","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283416","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=283416"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283416\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=283416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=283416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=283416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}