- scope "/api/v1", Pleroma.Web do
- pipe_through :masto_config
- # TODO: Move this
- get "/instance", TwitterAPI.UtilController, :masto_instance
+ scope "/api/v1", Pleroma.Web.MastodonAPI do
+ pipe_through :api
+ get "/instance", MastodonAPIController, :masto_instance
+ post "/apps", MastodonAPIController, :create_app
+
+ get "/timelines/public", MastodonAPIController, :public_timeline
+
+ get "/statuses/:id", MastodonAPIController, :get_status
+ end
+
+ scope "/api/v1", Pleroma.Web.MastodonAPI do
+ pipe_through :authenticated_api
+
+ get "/accounts/verify_credentials", MastodonAPIController, :verify_credentials
+ get "/timelines/home", MastodonAPIController, :home_timeline
+
+ post "/statuses", MastodonAPIController, :post_status