diff --git a/Swift/NetworkService.swift.twig b/Swift/NetworkService.swift.twig new file mode 100644 index 0000000..5acf6ee --- /dev/null +++ b/Swift/NetworkService.swift.twig @@ -0,0 +1,17 @@ +import LeadKit +import LeadKitAdditions + +{% set serviceName = concat(networkServiceName, "NetworkService") -%} +class {{ serviceName }}: ApiNetworkService { + + static let shared = {{ serviceName }}() + + private convenience init() { + self.init(sessionManager: {{ serviceName }}.sessionManager) + } + + override class var baseUrl: String { + return "{{ apiUrl }}" + } + +} \ No newline at end of file diff --git a/Swift/blocks/class/fields-mapping-from-map.twig b/Swift/blocks/class/fields-mapping-from-map.twig index 1cd9018..6bc9093 100644 --- a/Swift/blocks/class/fields-mapping-from-map.twig +++ b/Swift/blocks/class/fields-mapping-from-map.twig @@ -1,4 +1,4 @@ {%- import '../../utils.twig' as utils -%} {%- for field in fields %} - {{ field.name }} = {{ utils.formatNullable('try', field.nullable, field.optional) }} {{ utils.mappingFromMapForField(field) }} + {{ field.name }} = {{ utils.formatNullableOrOptional('try', field.nullable, field.optional) }} {{ utils.mappingFromMapForField(field) }} {%- endfor -%} \ No newline at end of file diff --git a/Swift/blocks/class/fields.twig b/Swift/blocks/class/fields.twig index 1fb0a84..d52adeb 100644 --- a/Swift/blocks/class/fields.twig +++ b/Swift/blocks/class/fields.twig @@ -4,6 +4,6 @@ // MARK: - Fields {% for field in fields %} /// {{ field.description }} - let {{ field.name }}: {{ utils.formatNullable(utils.formatValueType(field.type.type), field.nullable, field.optional) }} + let {{ field.name }}: {{ utils.formatNullableOrOptional(utils.formatValueType(field.type.type), field.nullable, field.optional) }} {% endfor -%} {% endif %} \ No newline at end of file diff --git a/Swift/blocks/class/init-parameters-fields.twig b/Swift/blocks/class/init-parameters-fields.twig index 7951993..23f4f0b 100644 --- a/Swift/blocks/class/init-parameters-fields.twig +++ b/Swift/blocks/class/init-parameters-fields.twig @@ -2,6 +2,6 @@ {%- if fields is not empty -%} {%- for field in fields -%} - {{ field.name }}: {{ utils.formatNullable(utils.formatValueType(field.type.type), field.nullable, field.optional) }}{% if field.optional %} = nil{% endif %}{%- if not (loop.last) %}, {% endif %} + {{ field.name }}: {{ utils.formatNullableOrOptional(utils.formatValueType(field.type.type), field.nullable, field.optional) }}{% if field.optional %} = nil{% endif %}{%- if not (loop.last) %}, {% endif %} {%- endfor -%} {%- endif -%} \ No newline at end of file diff --git a/Swift/utils.twig b/Swift/utils.twig index 20f890a..3255629 100644 --- a/Swift/utils.twig +++ b/Swift/utils.twig @@ -18,7 +18,7 @@ ImmutableMappable {%- endif -%} {% endmacro %} -{% macro formatNullable(expr, nullable, optional) %} +{% macro formatNullableOrOptional(expr, nullable, optional) %} {{- expr -}}{%- if nullable or optional -%}?{%- endif -%} {% endmacro %} diff --git a/Web-documentation/blocks/field-row.html.twig b/Web-documentation/blocks/field-row.html.twig new file mode 100644 index 0000000..0ddb2fa --- /dev/null +++ b/Web-documentation/blocks/field-row.html.twig @@ -0,0 +1,35 @@ +{%- macro formatValueType(valueType, nullable, objectsLinks) -%} + {%- import _self as self -%} + {%- import '../utils.twig' as utils -%} + + {%- if valueType.baseTypeName == "Map" -%} + Map<{{- self.formatValueType(valueType.keysType, false, objectsLinks) -}}, {{- self.formatValueType(valueType.valuesType, false, objectsLinks) -}}> + {%- elseif valueType.baseTypeName == "Array" -%} + {{- self.formatValueType(valueType.itemsType, false, objectsLinks) -}}[] + {%- else -%} + {%- set link = null -%} + + {%- for name, path in objectsLinks -%} + {%- if name == valueType.baseTypeName -%} + {%- set link = path -%} + {%- endif -%} + {%- endfor -%} + + {%- if link is not null -%} + {{- utils.formatNullable(valueType.typeName, nullable) -}} + {%- else -%} + {{- utils.formatNullable(valueType.typeName, nullable) -}} + {%- endif -%} + {%- endif -%} +{%- endmacro -%} + +{% import _self as self %} + +
+
{{ field.jsonName }}
+
+ {{ self.formatValueType(field.type.type, field.nullable, objectsLinks) }} +
+
{{ field.description }}
+
{{ utils.optionalDescription(field.optional) }}
+
\ No newline at end of file diff --git a/Web-documentation/blocks/head.html.twig b/Web-documentation/blocks/head.html.twig new file mode 100644 index 0000000..94e1aa9 --- /dev/null +++ b/Web-documentation/blocks/head.html.twig @@ -0,0 +1,9 @@ + + + + + {{ title }} + + + + \ No newline at end of file diff --git a/Web-documentation/blocks/header.html.twig b/Web-documentation/blocks/header.html.twig new file mode 100644 index 0000000..f72818c --- /dev/null +++ b/Web-documentation/blocks/header.html.twig @@ -0,0 +1,11 @@ +
+
+ + +
+
+ + +
\ No newline at end of file diff --git a/Web-documentation/blocks/main-menu.html.twig b/Web-documentation/blocks/main-menu.html.twig new file mode 100644 index 0000000..17f8f8d --- /dev/null +++ b/Web-documentation/blocks/main-menu.html.twig @@ -0,0 +1,8 @@ + +
  • Общие принципы построения API
  • +
  • Методы
  • +
  • PUSH-нотификации
  • +
  • Структура данных
  • +
  • Версионнирование API
  • +
  • Список возможных ошибок
  • +
    \ No newline at end of file diff --git a/Web-documentation/blocks/scripts.html.twig b/Web-documentation/blocks/scripts.html.twig new file mode 100644 index 0000000..737f78d --- /dev/null +++ b/Web-documentation/blocks/scripts.html.twig @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Web-documentation/blocks/secondary-menu.html.twig b/Web-documentation/blocks/secondary-menu.html.twig new file mode 100644 index 0000000..069eddf --- /dev/null +++ b/Web-documentation/blocks/secondary-menu.html.twig @@ -0,0 +1,8 @@ +
  • + {{ menuTitle }} + + {% for item in menu.items %} +
  • {{ item.title }}
  • + {% endfor %} +
    +
  • \ No newline at end of file diff --git a/Web-documentation/css/fonts.css b/Web-documentation/css/fonts.css new file mode 100644 index 0000000..01a401b --- /dev/null +++ b/Web-documentation/css/fonts.css @@ -0,0 +1,74 @@ +@font-face { + font-family: SanFrancisco; + font-weight: 400; + src: url(../fonts/SanFranciscoDisplay-Regular.otf); +} + +@font-face { + font-family: SanFrancisco; + font-weight: 500; + src: url(../fonts/SanFranciscoDisplay-Medium.otf); +} + +@font-face { + font-family: SanFrancisco; + font-weight: 600; + src: url(../fonts/SanFranciscoDisplay-Semibold.otf); +} + + +@font-face { + font-family: 'social-font'; + src: url('../fonts/social-font.eot?72523744'); + src: url('../fonts/social-font.eot?72523744#iefix') format('embedded-opentype'), + url('../fonts/social-font.svg?72523744#social-font') format('svg'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'social-font'; + src: url('data:application/octet-stream;base64,d09GRgABAAAAAAqoAA8AAAAAExAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADMAAABCsP6z7U9TLzIAAAGMAAAAQwAAAFY+JEl6Y21hcAAAAdAAAABKAAABcOkru7NjdnQgAAACHAAAAAoAAAAKAAAAAGZwZ20AAAIoAAAFlAAAC3CIkJBZZ2FzcAAAB7wAAAAIAAAACAAAABBnbHlmAAAHxAAAAFgAAABYjkDZ+mhlYWQAAAgcAAAAMAAAADYI4ywlaGhlYQAACEwAAAAdAAAAJAeWA1VobXR4AAAIbAAAAAgAAAAIB9AAAGxvY2EAAAh0AAAABgAAAAYALAAAbWF4cAAACHwAAAAfAAAAIACSC5luYW1lAAAInAAAAYMAAALxqbsbPHBvc3QAAAogAAAAHwAAADDX3mJ6cHJlcAAACkAAAABlAAAAe91rA4V4nGNgZGBg4GKQY9BhYHRx8wlh4GBgYYAAkAxjTmZ6IlAMygPKsYBpDiBmg4gCAIojA08AeJxjYGR+wTiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjC/YGYO+p/FEMUcxDAdKMwIkgMACu4MHAB4nO2QsQ2AQAwDz0qgQIxARc0sVOxfs8V/3sAWWDpLPqUKMAFRHEWCLsTIWVb2wWKf7L7J4e9o7eva6UYzf1b39i7/6gF1NSwJfQAAAAAAAAAAAAAAAAAAeJytVmlzE0cQndVhyzY+gg8SNoFZxnKMdlaYywgQxuxKFuAc8pXsQo5dS3bui0/8Bv2aXpFUkW/8tLweHdhgJ1VUKEr9pvftTPfrnl6T0JLEXliPpNx8Kaa2Nmlk50lIN2xajuJD2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EAPistsFUssgEBPistsFYssgAAQCstsFcssgABQCstsFgssgEAQCstsFkssgEBQCstsFossgAAQystsFsssgABQystsFwssgEAQystsF0ssgEBQystsF4ssgAAPystsF8ssgABPystsGAssgEAPystsGEssgEBPystsGIssDcrLrErARQrLbBjLLA3K7A7Ky2wZCywNyuwPCstsGUssAAWsDcrsD0rLbBmLLA4Ky6xKwEUKy2wZyywOCuwOystsGgssDgrsDwrLbBpLLA4K7A9Ky2waiywOSsusSsBFCstsGsssDkrsDsrLbBsLLA5K7A8Ky2wbSywOSuwPSstsG4ssDorLrErARQrLbBvLLA6K7A7Ky2wcCywOiuwPCstsHEssDorsD0rLbByLLMJBAIDRVghGyMhWUIrsAhlsAMkUHiwARUwLQBLuADIUlixAQGOWbABuQgACABjcLEABUKxAAAqsQAFQrEACCqxAAVCsQAIKrEABUK5AAAACSqxAAVCuQAAAAkqsQMARLEkAYhRWLBAiFixA2REsSYBiFFYugiAAAEEQIhjVFixAwBEWVlZWbEADCq4Af+FsASNsQIARAA=') format('truetype'); +} +/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ +/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ +/* +@media screen and (-webkit-min-device-pixel-ratio:0) { + @font-face { + font-family: 'social-font'; + src: url('../font/social-font.svg?72523744#social-font') format('svg'); + } +} +*/ + +[class^="icon-"]:before, [class*=" icon-"]:before { + font-family: "social-font"; + font-style: normal; + font-weight: normal; + speak: none; + + display: inline-block; + text-decoration: inherit; + width: 1em; + margin-right: .2em; + text-align: center; + /* opacity: .8; */ + + /* For safety - reset parent styles, that can break glyph codes*/ + font-variant: normal; + text-transform: none; + + /* fix buttons height, for twitter bootstrap */ + line-height: 1em; + + /* Animation center compensation - margins should be symmetric */ + /* remove if not needed */ + margin-left: .2em; + + /* you can be more comfortable with increased icons size */ + /* font-size: 120%; */ + + /* Uncomment for 3D effect */ + /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ +} +.icon-search:before { content: '\e803'; } /* '' */ diff --git a/Web-documentation/css/main.css b/Web-documentation/css/main.css new file mode 100644 index 0000000..0981259 --- /dev/null +++ b/Web-documentation/css/main.css @@ -0,0 +1,500 @@ +*,:after,:before { + box-sizing: border-box +} +html { + font-size: 10px; +} + +.text-centered { + text-align: center; +} + +body { + background-color: #222933; + font-size: 0; + line-height: 0; + min-width: 128rem; + font-family: 'SanFrancisco', sans-serif; + } + .aside { + display: inline-block; + vertical-align: top; + font-size: 14px; + } + .header { + height: 7rem; + font-size: 14px; + } + .content { + min-height: calc(100vh - 7rem); + font-size: 14px; + line-height: 1rem; + } + .aside-left { + width: 38.85rem; + } + .aside-left .header { + background-color: #333c48; + border-right: 1px solid #323b46; + border-bottom: 1px solid #2b333e; + } + .logo img { + height: 3.6em; + margin: .7em 0 0 2em; + } + .search-block { + float: right; + margin: 1.85rem 1.28rem 0 0; + font-size: 1.28rem; + padding: 0 1.07rem; + border-radius: 1.71rem; + border: 1px solid #E4E6EA; + background: #F0F2F5; + color: #8D9299; + position: relative; + } + .search-block input[type="text"] { + width: 21.5rem; + height: 3.14rem; + border: 0; + background: transparent; + padding-left: 0.71rem; + color: #666; + font-size: 1.42rem; + } + .search-block input[type="text"]::-webkit-input-placeholder { + color: #777; + } + .search-block input[type="text"]:focus { + outline: none; + } + + .typeahead-container { + position: absolute; + width: 100%; + background-color: white; + padding: 1.3rem .6rem 1.3rem 1.3rem; + box-shadow: 0 0 4px 1px #ccc; + left: 0; + top: 3.8rem; + } + .typeahead-container--hide { + display: none; + } + .typeahead-container:hover { + display: block; + } + + .typeahead-content { + width: 100%; + max-height: 22rem; + overflow: auto; + + } + .typeahead-container a:hover { + text-decoration: underline; + } + .typeahead-container a { + display: block; + line-height: 2.8rem; + font-size: 1.5rem; + color: #0ca9e6; + text-decoration: blink; + width: 85%; + overflow: hidden; + text-overflow: ellipsis; + } +.typeahead-content::-webkit-scrollbar { + width: 0.6rem; +} + +.typeahead-content::-webkit-scrollbar-track { + margin-right: 10px; + padding-right: 10px; +} + +.typeahead-content::-webkit-scrollbar-thumb { + background-color: #d5d6d8; + border-radius: 0.3rem; +} + .aside-left .content { + background-color: #222933; + border-right: 1px solid #888d94; + } + menu li { + cursor: pointer; + } + .aside-left menu.main { + list-style: none; + margin: 0; + background: #2b333e; + padding: 0 0 2.2rem; + } + .aside-left menu.main li a { + display: block; + line-height: 4rem; + vertical-align: middle; + padding-left: 3.57rem; + padding-right: 1.42rem; + font-size: 1.57rem; + color: #BEBFC1; + text-decoration: none; + transition: line-height .3s ease-out 0s; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + .aside-left menu.main > li a:hover, + .aside-left menu.main > li.active a { + line-height: 5.28rem; + background-color: #222933; + padding-left: 3.14rem; + border-left: 6px solid #0ca9e6; + color: white + } + .aside-left menu.main > li:first-child + li.active { + margin-top: 0; + } + .aside-left menu.secondary { + list-style: none; + margin: 0; + padding: 3.57rem 0 0 6.28rem; + } + .aside-left menu.secondary li a { + line-height: 2.64rem; + vertical-align: middle; + font-size: 1.42rem; + color: #0ca9e6; + text-decoration: none; + transition: line-height .3s ease-out 0s; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-right: 1.42rem; + display: inline-block; + width: 100%; + } + .aside-left menu.secondary > li:not(.active) > a:hover { + opacity: 0.8; + } + .aside-left menu.secondary > li.active > a { + color: white + } + .aside-left menu.secondary > li.active menu.child { + display: block; + } + .aside-left menu.child { + display: none; + list-style: none; + margin: 6px 0; + padding-left: 1.57rem; + border-left: 1px solid #fff; + width: 205px; + } + .aside-left menu.child > li > a{ + color: #7a7f85; + } + .aside-left menu.child > li.active > a{ + color: #fff; + } + .aside-right { + width: calc(100% - 38.85rem); + background-color: #f0f2f5; + } + .aside-right .header { + background-color: white; + box-shadow: 2px 1px 3px 0 #e9ebee; + width: calc(100% - 1.07rem); + border-bottom: 1px solid #e1e3e4; + } + .title { + font-size: 2rem; + line-height: 2.4rem; + padding-top: 2.2rem; + color: white; + padding-left: 4rem; + font-weight: bold; + } + .aside-right .content { + padding: 1rem; + } + .page-data { + width: 100%; + background-color: white; + min-height: calc(100vh - 9rem); + border: 1px solid #e9ebee; + padding: 5.28rem 14rem 5.28rem 6.14rem; + } + .page-data h2 { + font-size: 2rem; + margin: 4.28rem 0 1rem; + line-height: 2rem; + font-weight: 500; + } + .page-data h2:first-child { + margin-top: 0; + } + .page-data p { + font-size: 1.57rem; + color: #838890; + line-height: 2.2rem; + margin: 0.85rem 0 0; + } + .page-data a.info { + color: #0ca9e6; + cursor: pointer; + text-decoration: none; + } + .page-data a.info:hover { + text-decoration: underline; + } + .page-data p.sub-header { + font-weight: 500; + } + .table--small.table { + width: 50%; + min-width: 350px; + } + .table:first-child { margin-top: 0} + + .table { + width: 100%; + border: 1px solid #c8cdd6; + border-radius: 0.71rem 0.71rem 0 0; + background-color: #e9edf3; + margin-top: 1.71rem; + } + .table > .part-table { + display: table; + width: 100%; + } + .table p { + font-size: 1.4rem; + margin: 0; + line-height: 2rem; + } + .row-header { + display: table-row; + } + .row-header > * { + display: table-cell; + font-size: 1.15rem; + text-transform: uppercase; + color: #838890; + padding: 1rem 1.42rem 1rem; + border-bottom: 1px solid #c8cdd6; + border-right: 1px solid #c8cdd6; + line-height: 1.8rem; + white-space: nowrap; + } + .row-header > *:last-child { + border-right: 0; + } + .row-body { + display: table-row; + background-color: white; + } + .row-body > * { + display: table-cell; + font-size: 1.4rem; + color: #838890; + line-height: 1.2em; + padding: 1rem; + border-bottom: 1px solid #c8cdd6; + border-right: 1px solid #c8cdd6; + } + .row-body:last-child > * { + border-bottom: 0; + } + .row-body > *:last-child { + border-right: 0; + } + .part-block { + display: block; + font-size: 1.57rem; + padding: 1.42rem 1.42rem 1.28rem; + background-color: white; + border-radius: 0 0 0.71rem 0.71rem; + border-top: 1px solid #c8cdd6; + } + .example-response-expanded .part-block { + border-radius: 0; + border-bottom: 1px solid #c8cdd6; + } + + .part-example-response { + display: none; + padding: 1.42rem 1.42rem 1.28rem; + } + .example-response-expanded .part-example-response { + display: block; + } + .text-response { + padding: 1.42rem; + background-color: white; + border: 1px solid #c8cdd6; + margin: 0; + font-size: 1.2rem; + line-height: 1.57rem; + white-space: pre; + font-family: monospace; + min-height: 140px; + } + .example-response-expanded a.show-example-response:after { + transform: rotate(225deg); + top: 3px; + } + .example-response { + padding: 1.4rem; + background-color: #e9edf3; + border: 1px solid #c8cdd6; + margin-top: 10px; + } + .example-response > .text-response { + display: block; + } + .part-example-response > .inputs { + display: inline-block; + width: 14.15rem; + vertical-align: top; + margin-right: 1.42rem; + } + .part-example-response .inputs label { + display: block; + font-size: 1.28rem; + margin-top: 0.64rem; + line-height: 1.28rem; + } + .part-example-response .inputs label input { + width: 100%; + padding: 0.85rem 0.85rem 0.78rem; + margin-top: 0.35rem; + border: 1px solid #c8cdd6; + color: #838890; + height: 3.28rem; + } + .part-example-response .inputs label input::-ms-clear { + display: none; + } + .part-example-response .inputs label:first-child { + margin-top: 0.57rem; + } + .styled-select { + width: 100%; + margin-top: 0.35rem; + border: 1px solid #c8cdd6; + background: white; + overflow: hidden; + position: relative; + } + .styled-select:after { + content: ''; + display: block; + position: absolute; + top: 1.07rem; + right: 1.07rem; + border: 0.35rem solid #838890; + border-bottom-color: transparent; + border-right-color: transparent; + transform: rotate(225deg); + } + .styled-select select { + position: relative; + z-index: 2; + + width: 100%; + height: 100%; + padding: 0.85rem; + border: 0; + color: #838890; + background: transparent; + + -ms-appearance: none; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none !important; + } + .styled-select select::-ms-expand { + display: none; + } + + .styled-input { + position: relative; + } + .clear-btn { + position: absolute; + right: 0; + bottom: 0; + border: 1px solid #c9ccd3; + color: #c9ccd3; + background-color: #f7faff; + width: 3.14rem; + text-align: center; + height: 1.71rem; + font-size: 2.14rem; + line-height: 1.15rem; + } + .null-btn { + position: absolute; + right: 0; + bottom: 1.64rem; + border: 1px solid #c9ccd3; + color: #c9ccd3; + background-color: #f7faff; + width: 3.14rem; + text-align: center; + height: 1.64rem; + font-size: 1rem; + line-height: 1.57rem; + } + .clear-btn:hover, .null-btn:hover { + color: #999; + cursor: pointer; + } + .disabled { + pointer-events: none; + color: #bdc0c5; + } + .disabled input{ + pointer-events: all; + background-color: #f4f6f9; + } + + .btn { + background-color: #0ca9e6; + border: 0; + color: white; + font-size: 1.42rem; + padding: 1.15rem; + width: 100%; + margin-top: 1.71rem; + font-weight: 500; + } + .part-example-response > .text-response { + display: inline-block; + width: calc(100% - 16rem); + vertical-align: top; + margin-top: 2.2rem; + overflow: auto; + } + span.text-digit { + color: #0060ff; + } + span.text-string { + color: #037400; + } + a.show-example-response { + color: #0275eb; + cursor: pointer; + } + a.show-example-response:after { + content: ''; + border: 0.42rem solid; + position: relative; + display: inline-block; + border-top-color: transparent; + border-left-color: transparent; + transform: rotate(45deg); + margin-left: 0.71em; + top: -.28em; + } \ No newline at end of file diff --git a/Web-documentation/css/normalize.css b/Web-documentation/css/normalize.css new file mode 100644 index 0000000..2f0467f --- /dev/null +++ b/Web-documentation/css/normalize.css @@ -0,0 +1,424 @@ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS and IE text size adjust after device orientation change, + * without disabling user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability of focused elements when they are also in an + * active/hover state. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + box-sizing: content-box; /* 2 */ +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/Web-documentation/css/social-font-embedded.css b/Web-documentation/css/social-font-embedded.css new file mode 100644 index 0000000..e69de29 diff --git a/Web-documentation/errors.html.twig b/Web-documentation/errors.html.twig new file mode 100644 index 0000000..4c1b020 --- /dev/null +++ b/Web-documentation/errors.html.twig @@ -0,0 +1,42 @@ +{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %} + +
    +
    +
    {{ pageTitle }}
    +
    +
    + {%- include 'blocks/main-menu.html.twig' with { mainMenu: mainMenu } %} +
    +
    + +
    + {%- include 'blocks/header.html.twig' with { + imagesFolderPath: imagesFolderPath, + methodsPath: methodsPath, + relativeToRootPath: relativeToRootPath + } %} + +
    +
    +
    +
    +
    +
    Код ошибки
    +
    Текстовое описание ошибки
    +
    + {% for errorValue in errorType.values %} +
    +
    {{ errorValue.value }}
    +
    {{ errorValue.description }}
    +
    + {% endfor %} +
    +
    +
    +
    +
    + +{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %} + + + \ No newline at end of file diff --git a/Web-documentation/fonts/SanFranciscoDisplay-Medium.otf b/Web-documentation/fonts/SanFranciscoDisplay-Medium.otf new file mode 100644 index 0000000..481172e Binary files /dev/null and b/Web-documentation/fonts/SanFranciscoDisplay-Medium.otf differ diff --git a/Web-documentation/fonts/SanFranciscoDisplay-Regular.otf b/Web-documentation/fonts/SanFranciscoDisplay-Regular.otf new file mode 100644 index 0000000..b95988b Binary files /dev/null and b/Web-documentation/fonts/SanFranciscoDisplay-Regular.otf differ diff --git a/Web-documentation/fonts/SanFranciscoDisplay-Semibold.otf b/Web-documentation/fonts/SanFranciscoDisplay-Semibold.otf new file mode 100644 index 0000000..53203ff Binary files /dev/null and b/Web-documentation/fonts/SanFranciscoDisplay-Semibold.otf differ diff --git a/Web-documentation/fonts/social-font.eot b/Web-documentation/fonts/social-font.eot new file mode 100644 index 0000000..e8585fd Binary files /dev/null and b/Web-documentation/fonts/social-font.eot differ diff --git a/Web-documentation/fonts/social-font.svg b/Web-documentation/fonts/social-font.svg new file mode 100644 index 0000000..812ae2b --- /dev/null +++ b/Web-documentation/fonts/social-font.svg @@ -0,0 +1,14 @@ + + + +Copyright (C) 2016 by original authors @ fontello.com + + + + + + + + + + \ No newline at end of file diff --git a/Web-documentation/fonts/social-font.ttf b/Web-documentation/fonts/social-font.ttf new file mode 100644 index 0000000..298a3b1 Binary files /dev/null and b/Web-documentation/fonts/social-font.ttf differ diff --git a/Web-documentation/fonts/social-font.woff b/Web-documentation/fonts/social-font.woff new file mode 100644 index 0000000..2d959d5 Binary files /dev/null and b/Web-documentation/fonts/social-font.woff differ diff --git a/Web-documentation/images/logo.png b/Web-documentation/images/logo.png new file mode 100644 index 0000000..33d016b Binary files /dev/null and b/Web-documentation/images/logo.png differ diff --git a/Web-documentation/index.html.twig b/Web-documentation/index.html.twig new file mode 100644 index 0000000..e298588 --- /dev/null +++ b/Web-documentation/index.html.twig @@ -0,0 +1,69 @@ +{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %} + + +
    +
    +
    {{ pageTitle }}
    +
    +
    + {%- include 'blocks/main-menu.html.twig' with { mainMenu: mainMenu } %} +
    +
    + +
    + {%- include 'blocks/header.html.twig' with { + imagesFolderPath: imagesFolderPath, + methodsPath: methodsPath, + relativeToRootPath: relativeToRootPath + } %} + +
    +
    +

    Протокол общения между сервером и клиентом

    +

    HTTPS

    + +

    Стиль построения API

    +

    REST

    + +

    Используемая кодировка

    +

    UTF-8

    + +

    Допустимые задержки

    +

    Генерация ответа на сервере в среднем занимает меньше 1 секунды.

    + +

    Передача параметров

    +

    Параметры передаются в виде JSON-объекта в теле запроса. Для всех запросов должен быть выставлен + Content-Type: application/json. Url Query String не содержит параметров.

    + +

    Перечисления

    +

    Перечисления в JSON-объектах передаются в виде типа string.

    + + +

    Общий вид ответа сервера

    +

    Результат вызова любого метода представляет собоий JSON-объект следующеий структуры:

    +
    +
    +
    +
    Название поля
    +
    Тип поля
    +
    Название
    +
    Обязательность
    +
    + {% for field in responseClass.fields -%} + {%- include 'blocks/field-row.html.twig' with { + field: field, + objectsLinks: objectsLinks + } %} + {%- endfor %} +
    +
    + + +
    +
    +
    + +{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %} + + + \ No newline at end of file diff --git a/Web-documentation/js/main.js b/Web-documentation/js/main.js new file mode 100644 index 0000000..5701972 --- /dev/null +++ b/Web-documentation/js/main.js @@ -0,0 +1,136 @@ +$(function () { + $(document).ready(function () { + + $('.part-example-response .text-response').css('height', $('.inputs').height() - 21); + + $(document).on('click', 'menu li', function (e) { + e.stopPropagation(); + + $(this).closest('menu').find('li').removeClass('active'); + $(this).addClass('active'); + }); + + $(document).on('click', '.show-example-response', function () { + $(this) + .closest('.table') + .toggleClass('example-response-expanded'); + }); + + $(document).on('focus', '.search-block input', function () { + $(this).attr('placeholder', ''); + }); + + + $(document).on('blur', '.search-block input', function () { + $(this).attr('placeholder', 'Поиск'); + }); + + $(document).on('click', '.styled-input .null-btn', function () { + $(this) + .closest('.styled-input') + .find('input') + .val('NULL'); + }); + + $(document).on('focus', '.disabled input', function () { + $(this) + .closest('label') + .removeClass('disabled'); + }); + + $(document).on('click', '.run-btn', function (e) { + var model = serializeInputs('.inputs'); + var serverMethodPath = $(this).data('serverMethodPath') + + console.log('Send data: ' + JSON.stringify(model)); + + $.ajax({ + type: 'POST', + data: JSON.stringify(model), + contentType: 'application/json', + dataType: 'json', + url: serverMethodPath + }) + .done( + function (response) { + var json = JSON.stringify(response, null, 4); + json = highlightJson(json); + + $('.text-response').html(json); + }) + .fail( + function () { + alert('Ошибка запроса.'); + }); + }); + + + $(document).on('keyup', '.search-block input', function (e) { + var $searchInput = $(this); + var methodsUrl = $searchInput.data('methodsPath'); + var relativeUrl = $searchInput.data('relativeToRootPath'); + var $typeaheadContainer = $searchInput.closest('.search-block').find('.typeahead-container'); + var $typeaheadContent = $typeaheadContainer.find('.typeahead-content'); + + $.ajax({ + type: 'POST', + contentType: 'application/json', + dataType: 'json', + url: methodsUrl + }) + .done( + function (response) { + var itemsLink = ''; + response + .filter(function (item) { + return item.name.toLowerCase().indexOf($searchInput.val().toLowerCase()) >= 0; + }) + .forEach(function (item) { + itemsLink += '' + item.name + '' + }); + $typeaheadContent.html(itemsLink); + + if (itemsLink != '') { + $typeaheadContainer.removeClass('typeahead-container--hide'); + } else { + $typeaheadContainer.addClass('typeahead-container--hide'); + } + }) + .fail( + function () { + alert('Ошибка запроса.'); + }); + + }); + + $(document).on('blur', '.search-block input', function (e) { + $(this).closest('.search-block').find('.typeahead-container').addClass('typeahead-container--hide'); + }); + + $(document).on('click', '.styled-input .clear-btn', function (e) { + e.preventDefault(); + $(this) + .closest('label') + .addClass('disabled') + .find('input') + .val(''); + }); + + function serializeInputs(containerClass) { + var model = {}; + $(containerClass + ' label:not(.disabled) input,' + containerClass + ' label:not(.disabled) select') + .each(function () { + model[$(this).data('name')] = $(this).val() == 'NULL' ? null : $(this).val(); + }); + + return model; + } + + function highlightJson(jsonString) { + jsonString = jsonString.replace(/(".*":\s)(".*")/ig, "$1$2"); + jsonString = jsonString.replace(/(".*":\s)(\d*)/ig, "$1$2"); + + return jsonString + } + }); +}); \ No newline at end of file diff --git a/Web-documentation/methods.html.twig b/Web-documentation/methods.html.twig new file mode 100644 index 0000000..4b601f4 --- /dev/null +++ b/Web-documentation/methods.html.twig @@ -0,0 +1,130 @@ +{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %} + + +
    +
    +
    {{ pageTitle }}
    +
    +
    + {%- include 'blocks/main-menu.html.twig' with { mainMenu: mainMenu } %} + + + {% for menu in menus %} + {% include 'blocks/secondary-menu.html.twig' with { + menu: menu, + menuTitle: menu.title, + activeItemTypeName: name + } %} + {% endfor %} + + +
    +
    + +
    + {%- include 'blocks/header.html.twig' with { + imagesFolderPath: imagesFolderPath, + methodsPath: methodsPath, + relativeToRootPath: relativeToRootPath + } %} + +
    +
    +

    Метод

    +

    POST {{ url }}

    + +

    Параметры

    +
    +
    +
    +
    Название параметра
    +
    Тип параметра
    +
    Описание
    +
    Обязательность
    +
    + {% for field in requestFields -%} + {%- include 'blocks/field-row.html.twig' with { + field: field, + objectsLinks: objectsLinks + } %} + {%- endfor %} +
    + +
    +
    + {% for field in requestFields -%} + + {% endfor %} + + +
    +
    +
    +
    + +

    Возможные ошибки

    + {% for value in errorsEnumeration.values -%} + {%- if value.value in errorsEnumeration.allowedValues %} +

    #Код {{ value.value }} — {{ value.description }}

    + {%- endif -%} + {%- endfor %} + +

    Результат

    +

    Объект следующей структуры:

    + +
    +
    +
    +
    Название поля
    +
    Тип поля
    +
    Описание
    +
    Обязательность
    +
    + {% for field in responseFields -%} + {%- include 'blocks/field-row.html.twig' with { + field: field, + objectsLinks: objectsLinks + } %} + {%- endfor %} +
    +
    + +

    Комментарий

    +

    {{ description }}

    +
    +
    +
    + +{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %} + + + \ No newline at end of file diff --git a/Web-documentation/notification.html.twig b/Web-documentation/notification.html.twig new file mode 100644 index 0000000..c5c8b01 --- /dev/null +++ b/Web-documentation/notification.html.twig @@ -0,0 +1,68 @@ +{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %} + + +
    +
    +
    {{ pageTitle }}
    +
    +
    + {%- include 'blocks/main-menu.html.twig' with { mainMenu: mainMenu } %} + + +
  • Android
  • +
  • iOS
  • +
  • Windows Phone
  • +
    + +
    +
    + +
    + {%- include 'blocks/header.html.twig' with { + imagesFolderPath: imagesFolderPath, + methodsPath: methodsPath, + relativeToRootPath: relativeToRootPath + } %} + +
    +
    +

    Официальная документация

    +

    Ссылка от Apple

    + +

    Структура объекта нотификации

    +
    +
    { + "response": { + "count": 2428, + "items": + [ + { + "id": 54832560, + "first_name": "Anyutka", + "last_name": "Kiseleva", + "photo_50": "http://cs417830.v...4a7/Y-zZa02zvmQ.jpg" + }, + { + "id": 221194575, + "first_name": "Lera", + "last_name": "Chistova", + "photo_50": "http://cs322328.v...0fb/qi2nofkqneI.jpg" + } + ] + } +}
    +
    + +

    + <type> - Тип PUSH-нотификации. ( PushType )
    + <data_id> - Идентификатор карты или акции
    + <text> - Текст PUSH-нотификации.

    + +
    +
    +
    + +{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %} + + + \ No newline at end of file diff --git a/Web-documentation/structure_enumeration.html.twig b/Web-documentation/structure_enumeration.html.twig new file mode 100644 index 0000000..57daca3 --- /dev/null +++ b/Web-documentation/structure_enumeration.html.twig @@ -0,0 +1,56 @@ +{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %} + + +
    +
    +
    {{ pageTitle }}
    +
    +
    + {%- include 'blocks/main-menu.html.twig' %} + + + {% include 'blocks/secondary-menu.html.twig' with { + menu: enumsMenu, + menuTitle: "Перечисления", + activeItemTypeName: name + } %} + {% include 'blocks/secondary-menu.html.twig' with { + menu: classesMenu, + menuTitle: "Объекты" + } %} + + +
    +
    + +
    + {%- include 'blocks/header.html.twig' with { imagesFolderPath: imagesFolderPath } %} + +
    +
    +

    Описание

    +

    {{ description }}

    + +

    Возможные значения

    +
    +
    +
    +
    Значения
    +
    Описание
    +
    + {% for value in values %} +
    +
    {{ value.value }}
    +
    {{ value.description }}
    +
    + {% endfor %} +
    +
    +
    +
    +
    + +{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %} + + + \ No newline at end of file diff --git a/Web-documentation/structure_objects.html.twig b/Web-documentation/structure_objects.html.twig new file mode 100644 index 0000000..b20911d --- /dev/null +++ b/Web-documentation/structure_objects.html.twig @@ -0,0 +1,61 @@ +{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %} + + +
    +
    +
    {{ pageTitle }}
    +
    +
    + {%- include 'blocks/main-menu.html.twig' with { mainMenu: mainMenu } %} + + + {% include 'blocks/secondary-menu.html.twig' with { + menu: enumsMenu, + menuTitle: "Перечисления" + } %} + {% include 'blocks/secondary-menu.html.twig' with { + menu: classesMenu, + menuTitle: "Объекты" + } %} + + +
    +
    + +
    + {%- include 'blocks/header.html.twig' with { + imagesFolderPath: imagesFolderPath, + methodsPath: methodsPath, + relativeToRootPath: relativeToRootPath + } %} + +
    +
    +

    Описание

    +

    {{ description }}

    + +

    Структура данных

    +
    +
    +
    +
    Название поля
    +
    Тип поля
    +
    Описание
    +
    Обязательность
    +
    + {% for field in allFieldsOrdered -%} + {%- include 'blocks/field-row.html.twig' with { + field: field, + objectsLinks: objectsLinks + } %} + {%- endfor %} +
    +
    +
    +
    +
    + +{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %} + + + \ No newline at end of file diff --git a/Web-documentation/utils.twig b/Web-documentation/utils.twig new file mode 100644 index 0000000..6ee0674 --- /dev/null +++ b/Web-documentation/utils.twig @@ -0,0 +1,7 @@ +{% macro formatNullable(expr, nullable) %} +{{- expr -}}{%- if nullable -%}?{%- endif -%} +{% endmacro %} + +{% macro optionalDescription(optional) %} +{%- if optional -%}Нет{%- else -%}Да{%- endif -%} +{% endmacro %} diff --git a/Web-documentation/versioning.html.twig b/Web-documentation/versioning.html.twig new file mode 100644 index 0000000..e8bd55e --- /dev/null +++ b/Web-documentation/versioning.html.twig @@ -0,0 +1,63 @@ +{%- include 'blocks/head.html.twig' with { title: pageTitle, cssFolderPath: cssFolderPath } %} + + +
    +
    +
    {{ pageTitle }}
    +
    +
    + {%- include 'blocks/main-menu.html.twig' with { mainMenu: mainMenu } %} +
    +
    + +
    + {%- include 'blocks/header.html.twig' with { + imagesFolderPath: imagesFolderPath, + methodsPath: methodsPath, + relativeToRootPath: relativeToRootPath + } %} + +
    +
    +

    Описание

    +

    Необходимо иметь возможность поддержки нескольких версий API (для одновременной работы нескольких версий приложения). Также необходимо предусмотреть принудительное обновление какой-либо из версий.

    +

    Версии API будут размещаться на url-адресах вида <base_url>/v<version_number>/, где <version_number> - версия API.

    +

    При вызове любого метода в случае, если вызываемая версия API требует обновления приложения, сервер должен вернуть ошибку:
    + "Версия приложения устарела. Необходимо обновить приложение. Код 1."

    +

    При этом приложение должно показать пользователю диалог с предложением установить новую версию из маркета, а остальные функции должны стать недоступными. +

    + +

    Пример

    +

    Первая версия API будет располагаться по адресу: <base_url>/v1/.
    + В тот момент, когда эта версия API перестанет поддерживаться, на все запросы этой версии API сервер должен возвращать следующий ответ:

    +
    + +
    { + "response": { + "count": 2428, + "items": + [ + { + "id": 54832560, + "first_name": "Anyutka", + "last_name": "Kiseleva", + "photo_50": "http://cs417830.v...4a7/Y-zZa02zvmQ.jpg" + }, + { + "id": 221194575, + "first_name": "Lera", + "last_name": "Chistova", + "photo_50": "http://cs322328.v...0fb/qi2nofkqneI.jpg" + } + ] + } +}
    +
    +
    +
    +
    + +{%- include 'blocks/scripts.html.twig' with { jsFolderPath: jsFolderPath } %} + + + \ No newline at end of file