{"id":261657,"date":"2015-07-16T19:14:02","date_gmt":"2015-07-16T15:14:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=261657"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=261657","title":{"rendered":"\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f Web API, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u0442\u044b\u0434\u043d\u043e"},"content":{"rendered":"<p>             \u042f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e\u0431 \u0443\u0442\u0438\u043b\u0438\u0442\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u043e \u0431\u043e\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f Web API. \u041e \u0442\u043e\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0448\u0443 \u0432\u0441\u0435\u0445 \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7ae\/9e5\/4df\/7ae9e54df92d431baa27e54d77bd64f3.png\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0418\u0442\u0430\u043a, \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442, {username}! \u0422\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043f\u0440\u043e\u0441\u0438\u0448\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0447\u0435\u0433\u043e \u0442\u0430\u043a \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f? \u041e\u0442\u0432\u0435\u0442: apiDoc. \u0427\u0442\u043e \u0435\u0449\u0435 \u0437\u0430 apiDoc? apiDoc \u2014 \u044d\u0442\u043e \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0432 \u043a\u043e\u0434\u0435. \u041d\u043e \u0441 \u043e\u0434\u043d\u043e\u0439 \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u043e\u0439, \u044d\u0442\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0430. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043d\u0430: C#, Dart, Erlang, Go, Java, Javascript, PHP, Python, Ruby, Perl \u0438 \u043f\u0440\u043e\u0447\u0438\u0445. \u041d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 Python.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:<\/p>\n<ul>\n<li>Node.js(\u0441 npm)<\/li>\n<li>\u041f\u0440\u043e\u0435\u043a\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/li>\n<li>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Node.js<\/h2>\n<p>  \u0422\u0435 \u0443 \u043a\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043f\u0430\u043a\u0435\u0442 \u0441 Node.js, \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0443\u043d\u043a\u0442 \u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 npm. \u0410 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0441 \u0441\u0430\u0439\u0442\u0430 <a href=\"https:\/\/nodejs.org\">nodejs.org<\/a> \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0442\u043e\u0440 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e. \u041f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u0435 \u0447\u0442\u043e\u0431\u044b Node.js \u043f\u043e\u043f\u0430\u043b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $PATH. \u041f\u0440\u0438\u043c\u0435\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0430 \u0434\u043b\u044f Mac OS X:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/974\/1ff\/9e3\/9741ff9e316a416da34a6891c847d9fd.png\"\/><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 apiDoc<\/h2>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0432\u0441\u0435 \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 Node.JS \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u0430\u043b\u0435\u0435. \u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 apiDoc \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b (\u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 Windows) \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">sudo npm install -g apidoc<\/code><\/pre>\n<p>  \u0418 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f51\/212\/468\/f512124685db4fffbc81c55c14978d26.png\"\/><\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/h2>\n<p>  \u041d\u0443 \u0432\u043e\u0442 \u043c\u044b \u0438 \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0432 \u043a\u043e\u0434\u0435. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<pre><code class=\"python\">&quot;&quot;&quot; @api {get} \/2\/get_news?offset=:offset&count=:count \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 @apiName GetNews @apiGroup News @apiVersion 0.2.0  @apiParam {String} [count=5] \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 @apiParam {String} [offset=0] \u041a\u043e\u043b-\u0432\u043e \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u0441 \u043d\u0430\u0447\u0430\u043b\u0430  &quot;&quot;&quot; <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0435\u0441\u0442\u044c \u0447\u0442\u043e? \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u00ab\u0442\u0435\u0433\u043e\u0432\u00bb \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0412\u0441\u0435 \u0442\u0435\u0433\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/apidocjs.com\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h4>@api<\/h4>\n<p>  \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0433 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>@api {method} path [title]<\/code><\/pre>\n<p>  method \u2014 \u0442\u0438\u043f\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (GET,POST,PUT \u0438 \u0442.\u0434.)<br \/>  path \u2014 \u043f\u0443\u0442\u044c \u0434\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \/2\/get_news<br \/>  title \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/h4>\n<p>  <\/p>\n<pre><code class=\"python\">&quot;&quot;&quot; @api {get} \/user\/:id &quot;&quot;&quot; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h4>@apiName<\/h4>\n<p>  \u0422\u0435\u0433 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u043b\u043e\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>@apiName name<\/code><\/pre>\n<p>  name \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/h4>\n<p>  <\/p>\n<pre><code class=\"python\">&quot;&quot;&quot; @apiName GetNews &quot;&quot;&quot; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>@apiGroup<\/h4>\n<p>  \u0422\u0435\u0433 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0431\u043b\u043e\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0432 \u043e\u0434\u043d\u0443 \u0433\u0440\u0443\u043f\u043f\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>@apiGroup name<\/code><\/pre>\n<p>  name \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/h4>\n<p>  <\/p>\n<pre><code class=\"python\">&quot;&quot;&quot; @apiGroup News &quot;&quot;&quot; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h4>@apiVersion<\/h4>\n<p>  \u0422\u0435\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u0430.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ff8\/a13\/20f\/ff8a1320f978456c9d67617c9e054343.png\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>@apiVersion version<\/code><\/pre>\n<p>  version \u2014 \u0432\u0435\u0440\u0441\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"http:\/\/semver.org\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/h4>\n<p>  <\/p>\n<pre><code class=\"python\">&quot;&quot;&quot; @apiVersion 0.2.0 &quot;&quot;&quot; <\/code><\/pre>\n<p>  <\/p>\n<h4>@apiParam<\/h4>\n<p>  \u0422\u0435\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0432 \u043c\u0435\u0442\u043e\u0434<\/p>\n<p>  <b>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435:<\/b><\/p>\n<pre><code>@apiParam [{type}] [field=defaultValue] [description]<\/code><\/pre>\n<p>  type \u2014 \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430({Boolean}, {Number}, {String}, {Object}, {String[]} \u0438 \u043f\u0440\u043e\u0447\u0438\u0435)<br \/>  field \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0438 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u043a\u0430\u0437\u0430\u0432 \u0440\u0430\u0432\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<br \/>  description \u2014 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430  <\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/h4>\n<p>  <\/p>\n<pre><code class=\"python\">&quot;&quot;&quot; @apiParam {String} [count=5] \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 &quot;&quot;&quot; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>@apiSuccess <\/h4>\n<p>  \u0422\u0435\u0433 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0432 \u043c\u0435\u0442\u043e\u0434<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>@apiSuccess [{type}] field [description]<\/code><\/pre>\n<p>  type \u2014 \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430({Boolean}, {Number}, {String}, {Object}, {String[]} \u0438 \u043f\u0440\u043e\u0447\u0438\u0435)<br \/>  field \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<br \/>  description \u2014 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/h4>\n<p>  <\/p>\n<pre><code class=\"python\">&quot;&quot;&quot; @api {get} \/user\/:id @apiSuccess {String} firstname Firstname of the User. @apiSuccess {String} lastname  Lastname of the User. &quot;&quot;&quot; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0418\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/h2>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u043a\u0440\u0430\u0442\u043a\u043e\u0433\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0433\u0438 apiDoc \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435 \u0432 \u043a\u043e\u0440\u0435\u043d\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 apidoc.json.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 acidoc.json<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>{   &quot;name&quot;: &quot;\u041c\u043e\u0439 \u041d\u0413\u0422\u0423&quot;, \/\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430   &quot;version&quot;: &quot;0.2.0&quot;, \/\/\u0422\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f API(\u0431\u0443\u0434\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c\u0438)   &quot;description&quot;: &quot;\u041c\u043e\u0439 \u041d\u0413\u0422\u0423 - \u043e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u0441\u0442\u0443\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430&quot;, \/\/\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430   &quot;title&quot;: &quot;\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f API \u041c\u043e\u0439 \u041d\u0413\u0422\u0423&quot;, \/\/\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b API   &quot;url&quot; : &quot;https:\/\/api.mynstu.me&quot;, \/\/\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Web API   &quot;sampleUrl&quot;: &quot;https:\/\/api.mynstu.me&quot;, \/\/\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Web API   &quot;template&quot;: { \/\/\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430   \t&quot;withCompare&quot;: true, \/\/\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435   \t&quot;withGenerator&quot;: true \/\/ \u041d\u0443 \u0438 \u0442\u043e \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c apiDoc   } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"bash\">apidoc<\/code><\/pre>\n<p>  \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u044d\u0442\u043e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9e9\/c9c\/b3e\/9e9c9cb3efa5482798b2810729d3e5e4.png\"\/><\/p>\n<p>  \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 doc \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043b\u0435\u0436\u0438\u0442 \u0432 \u043a\u043e\u0440\u043d\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 index.html.<\/p>\n<h2>\u0418\u0442\u043e\u0433\u0438<\/h2>\n<p>  \u0423 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u0443\u044e \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e. \u0412\u043e\u0442 \u043a\u0430\u043a \u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/446\/3ab\/9b2\/4463ab9b2a054e48a9b9273d0b639ba5.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a \u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043f\u043e\u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043e\u0447\u043a\u0438 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/api.mynstu.me\/docs\">\u0437\u0434\u0435\u0441\u044c<\/a>.             <\/p>\n<div class=\"clear\"><\/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\/post\/262813\/\"> http:\/\/habrahabr.ru\/post\/262813\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>             \u042f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u043c \u043e\u0431 \u0443\u0442\u0438\u043b\u0438\u0442\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u043e \u0431\u043e\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f Web API. \u041e \u0442\u043e\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0448\u0443 \u0432\u0441\u0435\u0445 \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7ae\/9e5\/4df\/7ae9e54df92d431baa27e54d77bd64f3.png\"\/>  <\/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-261657","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/261657","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=261657"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/261657\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=261657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=261657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=261657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}