Difference between revisions of "Developers"

From Ace Stream Wiki
Jump to: navigation, search
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Термины==
+
==Terms==
* '''Разработчик''' – пользователь Ace Stream, который зарегистрировался как "рабработчик приложений"
+
* '''Developer''' – Ace Stream user, who is registered as "application developer"
* '''Клиент API''' - пользователь, который имеет доступ к API реселлера
+
* '''API client''' - user, who has an access to API
* '''Ключ пользователя''' - идентификатор пользователя в системе Ace Stream
+
* '''User key''' - user ID in Ace Stream system
* '''Опция''' - дополнительная сервисная/программная услуга Ace Stream, которая может быть активирована для конкретного ключа пользователя
+
* '''Option''' - additional service / software service of Ace Stream, which can be activated for a specific user key
* '''Приложение''' - приложение разработчика, которое работает с системой Ace Stream
+
* '''Application''' - developer's application, which works with Ace Stream system
  
==Как получить доступ к API для реселлеров==
+
==Registration and getting a product key==
Когда пользователь Ace Stream получает статус "разработчик продуктов", он автоматически становится клиентом API и ему предоставляется доступ к API в виде двух идентификаторов:
+
Let's suppose that you have decided to create an application, which works with Ace Stream system (for example, a player). To do this you have to use [[Engine_API/en|Engine API]], to access which you have to get a [[Product_key/en|product key]]
* '''API key''' - строка, которая используется для идентификации пользователя в запросах API
 
* '''API secret''' - секретный ключ, который используется для цифровой подписи запросов API
 
  
Секретный ключ пользователь может поменять самостоятельно в админ-панели.
+
To do this you have to:
 +
* register in [https://accounts.acestream.net Ace Stream] system
 +
* in section [https://accounts.acestream.net/partnership «Partnership»] press a button "Become a developer"
 +
* confirm your agreement with terms and press a button "Register"
  
==Регистрация и получение ключа продукта==
+
After this a section "Developer", in which you can view and change API settings (API Key and API Secret), as well as manage your applications at subsection "Applications", will appear in the menu on the left.
Предположим, что Вы решили создать приложение, которое работает с системой Ace Stream (например, плеер). Для этого Вам будет необходимо использовать [[Engine_API|API движка Ace Stream]], для доступа к которому необходимо получить [[Product_key|ключ продукта]]
 
  
Для этого Вам необходимо:
+
To get the product key for a new application, you have to press a button "Register an application" and fill out appeared form. Please, provide as much information about your application in a field "Description", as you can, because it will speed up a procedure for issuing the product key.
* зарегистрироваться в системе [https://accounts.acestream.net Ace Stream]
 
* в разделе [https://accounts.acestream.net/partnership «Партнерка»] нажать кнопку "Стать разработчиком"
 
* подтвердить свое согласие с условиями и нажать кнопку "Зарегистироваться"
 
  
После этого в меню слева появится раздел "Разработчик", в котором Вы можете посмотреть и изменить настройки API (API Key и API Secret), а также управлять своими приложениями в подразделе "Приложения".
+
After registering the application you will see it in a list of applications with a status "Not confirmed". After we check your application, you will get a letter with the product key, the status in the list of applications will be changed to "Confirmed" and public part of the product key will appear. Full product key does not appear in the list of applications for safety reasons.
  
Для того, чтобы получить ключ продукта для нового приложения, необходимо нажать кнопку "Зарегистрировать приложение" и заполнить появившуюся форму. Просьба предоставлять как можно больше информации о Вашем приложении в поле "Описание", так как это ускорит процедуру выдачи ключа продукта.
+
==What is API==
 +
API for developers allows them to activate different options for users of their applications.
  
После регистрации приложения Вы увидите его в списке приложений со статусом "Не подтверждено". После того, как мы проверим Ваше приложение, Вы получите письмо с ключом продукта, в списке приложений статус изменится на "Подтверждено" и появится публичная часть ключа продукта. Полный ключ продукта в списке приложений не выводится из соображений безопасности.
+
==How to get an access to API==
 +
When Ace Stream user receives status "product developer", he becomes API client automatically and he is provided with the access to API in the form of two identifiers:
 +
* '''API key''' - string, used for user's ID in API requests
 +
* '''API secret''' - secret key, used for a digital signature of API requests
  
==Активация опций для пользователя==
+
You can change reseller's secret key by yourself in admin-panel.
Для того, чтобы активировать опцию пользователю, необходимо вызвать метод API [[Reseller_API#activateService|activateService]] и передать ему такие параметры:
+
 
 +
==Activation of options for user==
 +
To activate an option for user you have to call API method [[Reseller_API/en#activateService|activateService]] and give him the following parameters:
 
* API key
 
* API key
* публичная часть ключа продукта
+
* public part of the product key
* ключ пользователя
+
* user key
* идентификатор опции
+
* option ID
* идентификатор периода, на который необходимо активировать опцию
+
* ID of a period, on which you want to activate the option
  
При успешном выполнении запроса с баланса разработчика будет списана определенная сумма, а у пользователя активируется опция на указанный период.
+
If the request was completed successfully, a certain amount will be charged from developer's balance, and the user will have the option activated for a specified period.  
  
Если у пользователя в данный момент уже активирована указанная опция, то срок действия опции продлится на указанный срок.
+
If user has this option activated already, validity of the option will continue for a specified period.
  
Как видно из описания, для активации опции разработчик должен знать ключ пользователя. Ключ можно получить с помощью метода API [[Reseller_API#activateService| createUserKey]]. Созданный с помощью этого метода ключ пользователя необходимо добавить в движок с помощью метода сервисного API движка [[Engine_Service_API#load_extension|load_extension]]
+
As you can see in the description, to activate the option the developer has to know user key. This key can be received useing API method [[Reseller_API/en#activateService| createUserKey]]. User key created using this method has to be added to the enging using method of service engine API [[Engine_Service_API/en#load_extension|load_extension]]

Latest revision as of 15:07, 5 September 2017

Terms

  • Developer – Ace Stream user, who is registered as "application developer"
  • API client - user, who has an access to API
  • User key - user ID in Ace Stream system
  • Option - additional service / software service of Ace Stream, which can be activated for a specific user key
  • Application - developer's application, which works with Ace Stream system

Registration and getting a product key

Let's suppose that you have decided to create an application, which works with Ace Stream system (for example, a player). To do this you have to use Engine API, to access which you have to get a product key

To do this you have to:

  • register in Ace Stream system
  • in section «Partnership» press a button "Become a developer"
  • confirm your agreement with terms and press a button "Register"

After this a section "Developer", in which you can view and change API settings (API Key and API Secret), as well as manage your applications at subsection "Applications", will appear in the menu on the left.

To get the product key for a new application, you have to press a button "Register an application" and fill out appeared form. Please, provide as much information about your application in a field "Description", as you can, because it will speed up a procedure for issuing the product key.

After registering the application you will see it in a list of applications with a status "Not confirmed". After we check your application, you will get a letter with the product key, the status in the list of applications will be changed to "Confirmed" and public part of the product key will appear. Full product key does not appear in the list of applications for safety reasons.

What is API

API for developers allows them to activate different options for users of their applications.

How to get an access to API

When Ace Stream user receives status "product developer", he becomes API client automatically and he is provided with the access to API in the form of two identifiers:

  • API key - string, used for user's ID in API requests
  • API secret - secret key, used for a digital signature of API requests

You can change reseller's secret key by yourself in admin-panel.

Activation of options for user

To activate an option for user you have to call API method activateService and give him the following parameters:

  • API key
  • public part of the product key
  • user key
  • option ID
  • ID of a period, on which you want to activate the option

If the request was completed successfully, a certain amount will be charged from developer's balance, and the user will have the option activated for a specified period.

If user has this option activated already, validity of the option will continue for a specified period.

As you can see in the description, to activate the option the developer has to know user key. This key can be received useing API method createUserKey. User key created using this method has to be added to the enging using method of service engine API load_extension