Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Password recovery is done by http://docs.otapi.net/en/Documentations/Method?name=RequestPasswordRecovery method.  
Field userIdentifier may contain user login or email. After calling RequestPasswordRecovery, show user the message "Further instructions were sent to your email" and display a form with confirmation code and two text fields for entering the password. User checks code in the email, returns to the application, enters the code and new password. If both fields with password match, then you need to call http://docs.otapi.net/en/Documentations/Method?name=ConfirmNewPassword. ConfirmNewPassword response has Result-> SessionId-> Value field that contains an authorized user session. Based on this session, you need to authorize user in the application immediately.

Главная страница приложения

Получение подборок

Application home page

Get collections

Use Для получения подборок, используем метод http://docs.otapi.net/ruen/Documentations/Method?name=BatchSearchRatingLists . При первом запросе передаем параметры:  method to get collections. We pass the following parameters at the first request:

Блок кода
languagexml
<BatchRatingListSearchParameters><UseDefaultParameters>true</UseDefaultParameters></BatchRatingListSearchParameters>

и параметр and parameter applicationType=MobileApplication. В полученных данных для каждой подборки имеется порядковый номер для сортировки <Order>0</Order> , нужно отобразить на экране приложения подборки согласно этой сортировке.Рекомендуется показывать подборки покупателю только из кэша. В кэше подборки необходимо обновлять в фоновом режиме: раз в 60 минут запрашивать метод BatchSearchRatingLists и сохранять результат в кэш. При получении ответа, нужно проверить узел HasTranslateErrors Received data for each collection has a serial number for sorting <Order> 0 </Order>, you need to display collections on the application screen according to this sorting. It is recommended to show collections only from cache. Collections in cache must be updated in background: every 60 minutes, request BatchSearchRatingLists method and save result in the cache. When receiving a response, you need to check HasTranslateErrors node (http://docs.dev.otapi.net/ruen/Documentations/Type?name=BatchRatingListsSearchResultAnswer), если узел равен if the node is "true", то кэшировать ответ ну нужно. Для каждого элемента RatingList в ответе необходимо проверить узел HasError then you do not need to cache the response. You must check HasError node (http://docs.dev.otapi.net/ruen/Documentations/Type?name=RatingListSearchResult), если узел равен "true", то этот элемент подборки кэшировать не нужно.

Таким образом получаем ситуацию, когда покупатель видит подборки, которые находятся в кэше. При этом подборки в кэше не имеют ошибок. Возможна ситуация когда мы показываем пользователю устаревшую информацию, при этом мы уверены что эта информация без ошибок.

Получение баннеров

 for each RatingList element in the response, if the node is true, then this collection item does not need to be cached.

Thus, we get a situation when buyer sees collections from cache. At the same time, collections in the cache have no errors. Situation is possible when we show user outdated information, while we are sure that this information is error-free.

Get banners

You can get a full list of banners configured for application by Полный список баннеров, настроенных для приложения, можно получить методом http://docs.otapi.net/ruen/Documentations/Method?name=GetBanners  method, передав параметр passing applicationType=MobileApplication parameter.На каждый баннер будет его название, адрес картинки, тип действия, и параметр действия. Ниже перечислены текущие имеющиеся типы действий и смысл их параметров.

Each banner will have its name, image address, type of action, and action parameter. The current types of actions and the meaning of their parameters are listed below.

The current types of actions and their parameters purpose are listed below:

Тип действияПараметр

Url

Абсолютный адрес ссылки, которую нужно открыть при нажатии на баннер

Category

Идентификатор категории, которую нужно открыть при нажатии на баннер

...

Absolute address of the link to open when you click banner

Category

ID of the category that should be opened when clicking the banner


Short categories menu

TODO:

...

Social networks

TODO:

...

User Preferences

  • Валюты. Список доступных валют необходимо показать из настроек приложения GetCommonInstanceOptionsInfo узел Currencies.
  • Страна доставки. Список доступных стран необходимо показать из настроек приложения GetCommonInstanceOptionsInfo узел DeliveryCountries. Список стран необходимо отображать с учетом текущего языка приложения (все переводы можно найти в узле TranslatableOptions).
  • Язык приложения. Список доступных языков приложения показать из настроек приложения GetCommonInstanceOptionsInfo узел Languages.

...