class Api::Tasks::CreateTask

Overview

JSON API: Creates transcompilation task and returns id to fetch the result later.

This class harbours api functionality regarding the creation of transcompiler tasks.

Example for calling the api:

curl example.com/api/createtask -X POST -H "Content-Type: application/json" -d '{
	"auth_token": "your-token",
	"transcompile_task": {
		"inp_lang": "inp-lang",
		"outp_lang": "outp-lang",
		"input_code": "your-encoded-code"
	}
}'

On success returns:

{"id":"task-id"}

Defined in:

actions/api/tasks/create_task.cr

Constant Summary

AFTER_PIPES = [] of Symbol

JSON API: Creates transcompilation task and returns id to fetch the result later.

This class harbours api functionality regarding the creation of transcompiler tasks.

Example for calling the api:

curl example.com/api/createtask -X POST -H "Content-Type: application/json" -d '{
	"auth_token": "your-token",
	"transcompile_task": {
		"inp_lang": "inp-lang",
		"outp_lang": "outp-lang",
		"input_code": "your-encoded-code"
	}
}'

On success returns:

{"id":"task-id"}
BEFORE_PIPES = [verify_accepted_format, require_auth_token] of Symbol

JSON API: Creates transcompilation task and returns id to fetch the result later.

This class harbours api functionality regarding the creation of transcompiler tasks.

Example for calling the api:

curl example.com/api/createtask -X POST -H "Content-Type: application/json" -d '{
	"auth_token": "your-token",
	"transcompile_task": {
		"inp_lang": "inp-lang",
		"outp_lang": "outp-lang",
		"input_code": "your-encoded-code"
	}
}'

On success returns:

{"id":"task-id"}
EXPOSURES = [] of Symbol

JSON API: Creates transcompilation task and returns id to fetch the result later.

This class harbours api functionality regarding the creation of transcompiler tasks.

Example for calling the api:

curl example.com/api/createtask -X POST -H "Content-Type: application/json" -d '{
	"auth_token": "your-token",
	"transcompile_task": {
		"inp_lang": "inp-lang",
		"outp_lang": "outp-lang",
		"input_code": "your-encoded-code"
	}
}'

On success returns:

{"id":"task-id"}
PARAM_DECLARATIONS = [] of Crystal::Macros::TypeDeclaration

JSON API: Creates transcompilation task and returns id to fetch the result later.

This class harbours api functionality regarding the creation of transcompiler tasks.

Example for calling the api:

curl example.com/api/createtask -X POST -H "Content-Type: application/json" -d '{
	"auth_token": "your-token",
	"transcompile_task": {
		"inp_lang": "inp-lang",
		"outp_lang": "outp-lang",
		"input_code": "your-encoded-code"
	}
}'

On success returns:

{"id":"task-id"}
ROUTE_SETTINGS = {prefix: ""}

JSON API: Creates transcompilation task and returns id to fetch the result later.

This class harbours api functionality regarding the creation of transcompiler tasks.

Example for calling the api:

curl example.com/api/createtask -X POST -H "Content-Type: application/json" -d '{
	"auth_token": "your-token",
	"transcompile_task": {
		"inp_lang": "inp-lang",
		"outp_lang": "outp-lang",
		"input_code": "your-encoded-code"
	}
}'

On success returns:

{"id":"task-id"}
SKIPPED_PIPES = [] of Symbol

JSON API: Creates transcompilation task and returns id to fetch the result later.

This class harbours api functionality regarding the creation of transcompiler tasks.

Example for calling the api:

curl example.com/api/createtask -X POST -H "Content-Type: application/json" -d '{
	"auth_token": "your-token",
	"transcompile_task": {
		"inp_lang": "inp-lang",
		"outp_lang": "outp-lang",
		"input_code": "your-encoded-code"
	}
}'

On success returns:

{"id":"task-id"}

Class Method Summary

Instance Method Summary

Class methods inherited from class ApiAction

_accepted_formats _accepted_formats

Instance methods inherited from module Api::Auth::Helpers

current_user? : User | Nil current_user?, current_user__tuple_cached? : Tuple(User | Nil) current_user__tuple_cached?, current_user__uncached? : User | Nil current_user__uncached?

Class Method Detail

def self.path(*args, **named_args) : String #

def self.path_without_query_params #

def self.route(anchor : String | Nil = nil) : Lucky::RouteHelper #

def self.url(*args, **named_args) : String #

def self.url_without_query_params #

def self.with(anchor : String | Nil = nil) : Lucky::RouteHelper #

Instance Method Detail

def call #