Mix.Tasks.Nativegen.Swift.Method

Append request method to existing client code.

Example

mix nativegen.swift.method post /api/chat/response responseMessage Chat thread_id:integer message:string

Summary

append_file(content, path)
extract_param(method_name)

extract parameters from route

generate_content(list1, opts)
generate_method(http_method, route, method_name, response_type, params)
generate_method(request_method, http_method, route, method_name, response_type, params)
generate_method(atom1, request_method, http_method, route, method_name, response_type, params)
replace_param(method_name)
request_method(arg1)
run(args)

Callback implementation for c:Mix.Task.run/1

show_on_shell(content)

Functions

append_file(content, path)
extract_param(method_name)

extract parameters from route.

Example: iex> extract_param(“/users/:id/show”) %{“param” => “id”}

generate_content(list1, opts)
generate_method(http_method, route, method_name, response_type, params)
generate_method(request_method, http_method, route, method_name, response_type, params)
generate_method(atom1, request_method, http_method, route, method_name, response_type, params)
replace_param(method_name)
request_method(arg1)
run(args)

Callback implementation for c:Mix.Task.run/1.

show_on_shell(content)