What do you all think of an interface like this? ```elixir defmodule Procore.Endpoint do def construct(%Procore.Company{id :id}), do: "/vapid/companies/#{id}" def construct(%Procore.Company{}), do: "/vapid/companies" def construct(%Procore.Inspection{project_id: project_id, id :id}), do: "/vapid/projects/#{project_id}/inspections/#{id}" end defmodule Procore.Api do def get(struct), do: struct |> Procore.Endpoint.construct() |> OauthClient.get() def post(struct, params), do: struct |> Procore.Endpoint.construct() |> OauthClient.post(params) end %Procore.ApiResponse{body: body} = Procore.Api.get(%Procore.Company{id: 1}) %Procore.ApiResponse{body: body} = Procore.Api.post( %Procore.Inspection{project_id: 2, id: 1}, %{title: "example title"} ) ```
What do you all think of an interface like this?