2024-11-29 09:39:35 +00:00
|
|
|
defmodule TestHandler do
|
2024-11-29 09:42:27 +00:00
|
|
|
@behaviour PlugIndie.HandlerBehaviour
|
2024-11-29 09:39:35 +00:00
|
|
|
|
|
|
|
@impl true
|
2024-11-29 09:42:27 +00:00
|
|
|
def handle_create(_type, %PlugIndie.Post{} = properties, _access_token) do
|
2024-11-29 09:39:35 +00:00
|
|
|
case properties.type do
|
|
|
|
:note ->
|
|
|
|
{:ok, :created, "/notes/4711"}
|
|
|
|
|
|
|
|
:bookmark ->
|
|
|
|
{:ok, :created, "/bookmarks/4711"}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
@impl true
|
|
|
|
def handle_update(_, _, _, _, _) do
|
|
|
|
end
|
|
|
|
|
|
|
|
@impl true
|
|
|
|
def handle_undelete(_, _) do
|
|
|
|
end
|
|
|
|
|
|
|
|
@impl true
|
|
|
|
def handle_delete(_, _) do
|
|
|
|
end
|
|
|
|
|
|
|
|
@impl true
|
|
|
|
def handle_syndicate_to_query(_) do
|
|
|
|
end
|
|
|
|
|
|
|
|
@impl true
|
|
|
|
def handle_source_query(_, _, _) do
|
|
|
|
end
|
|
|
|
|
|
|
|
@impl true
|
|
|
|
def handle_config_query(_) do
|
|
|
|
end
|
|
|
|
|
|
|
|
@impl true
|
|
|
|
def handle_media(_, _) do
|
|
|
|
end
|
|
|
|
end
|