README.md

# Xmeta

**TODO: Add description**

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `xmeta` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [
    {:xmeta, "~> 0.1.0"}
  ]
end
```

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at <https://hexdocs.pm/xmeta>.


# PageController
defmodule AiotWeb.PageController do
  use AiotWeb, :controller

  def home(conn, _params) do
    # The home page is often custom made,
    # so skip the default app layout.
    render(conn, :home, layout: false)
  end

  def xapi(conn, params) do
    rsp = Xmeta.Xapi.Phx.call_api(conn,params)
    json(conn,rsp)
  end
end

# add phx router
scope "/api" do
  get "/:xapi_site/:xapi_router/:xapi_view", AiotWeb.PageController, :xapi
  post "/:xapi_site/:xapi_router/:xapi_view", AiotWeb.PageController, :xapi
  forward "/docs", Xmeta.Xapi.Docs.Plug
end