View Source Reydenx.Action (Reyden-X v0.1.0)
Provides access to order statistics methods, methods for changing the status of orders, as well as for checking the status of jobs
Summary
Functions
Add Views to Order
Cancel Order
Change the time of the smooth set of viewers
Change the Number of Viewers
Disable smooth increase of viewers
Enable smooth increase of viewers
Run Order
Stop Order
Check the Task Status
Types
@type p() :: pos_integer()
Functions
@spec add_views( token :: %Reydenx.Model.Token{ access_token: term(), expires_in: term(), token_type: term() }, order_id :: p(), value :: p() ) :: t()
Add Views to Order
Examples:
### Success:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.add_views(token, 123456, 1000)
{:ok, %Reydenx.Model.ActionResult{}}
### Fail:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.add_views(token, 123456, 1000)
{:error, %Reydenx.Model.ResponseError{
path: "/",
status_code: 404,
message: "Not Found"
}}
@spec cancel( token :: %Reydenx.Model.Token{ access_token: term(), expires_in: term(), token_type: term() }, order_id :: p() ) :: t()
Cancel Order
Examples:
### Success:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.cancel(token, 123456)
{:ok, %Reydenx.Model.ActionResult{}}
### Fail:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.cancel(token, 123456)
{:error, %Reydenx.Model.ResponseError{
path: "/",
status_code: 404,
message: "Not Found"
}}
@spec change_increase( token :: %Reydenx.Model.Token{ access_token: term(), expires_in: term(), token_type: term() }, order_id :: p(), value :: p() ) :: t()
Change the time of the smooth set of viewers
Examples:
### Success:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.change_increase(token, 123456, 1000)
{:ok, %Reydenx.Model.ActionResult{}}
### Fail:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.change_increase(token, 123456, 1000)
{:error, %Reydenx.Model.ResponseError{
path: "/",
status_code: 404,
message: "Not Found"
}}
@spec change_online( token :: %Reydenx.Model.Token{ access_token: term(), expires_in: term(), token_type: term() }, order_id :: p(), value :: p() ) :: t()
Change the Number of Viewers
Examples:
### Success:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.change_online(token, 123456, 1000)
{:ok, %Reydenx.Model.ActionResult{}}
### Fail:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.change_online(token, 123456, 1000)
{:error, %Reydenx.Model.ResponseError{
path: "/",
status_code: 404,
message: "Not Found"
}}
@spec increase_off( token :: %Reydenx.Model.Token{ access_token: term(), expires_in: term(), token_type: term() }, order_id :: p() ) :: t()
Disable smooth increase of viewers
Examples:
### Success:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.increase_off(token, 123456)
{:ok, %Reydenx.Model.ActionResult{}}
### Fail:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.increase_off(token, 123456)
{:error, %Reydenx.Model.ResponseError{
path: "/",
status_code: 404,
message: "Not Found"
}}
@spec increase_on( token :: %Reydenx.Model.Token{ access_token: term(), expires_in: term(), token_type: term() }, order_id :: p(), value :: p() ) :: t()
Enable smooth increase of viewers
Examples:
### Success:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.increase_on(token, 123456, 1000)
{:ok, %Reydenx.Model.ActionResult{}}
### Fail:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.increase_on(token, 123456, 1000)
{:error, %Reydenx.Model.ResponseError{
path: "/",
status_code: 404,
message: "Not Found"
}}
@spec run( token :: %Reydenx.Model.Token{ access_token: term(), expires_in: term(), token_type: term() }, order_id :: p() ) :: t()
Run Order
Examples:
### Success:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.run(token, 123456)
{:ok, %Reydenx.Model.ActionResult{}}
### Fail:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.run(token, 123456)
{:error, %Reydenx.Model.ResponseError{
path: "/",
status_code: 404,
message: "Not Found"
}}
@spec stop( token :: %Reydenx.Model.Token{ access_token: term(), expires_in: term(), token_type: term() }, order_id :: p() ) :: t()
Stop Order
Examples:
### Success:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.stop(token, 123456)
{:ok, %Reydenx.Model.ActionResult{}}
### Fail:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.stop(token, 123456)
{:error, %Reydenx.Model.ResponseError{
path: "/",
status_code: 404,
message: "Not Found"
}}
@spec task_status( token :: %Reydenx.Model.Token{ access_token: term(), expires_in: term(), token_type: term() }, order_id :: p(), task_id :: String.t() ) :: {:error, Reydenx.Model.ResponseError} | {:ok, Reydenx.Model.TaskStatus}
Check the Task Status
Examples:
### Success:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.task_status(token, "some_task_id")
{:ok, %Reydenx.Model.TaskStatus{}}
### Fail:
iex> {:ok, token} = Reydenx.new()
iex> Reydenx.Action.task_status(token, "some_task_id")
{:error, %Reydenx.Model.ResponseError{
path: "/",
status_code: 404,
message: "Not Found"
}}