+ pipeline :config do
+ plug :accepts, ["json", "xml"]
+ end
+
+ pipeline :oauth do
+ plug :accepts, ["html", "json"]
+ end
+
+ scope "/oauth", Pleroma.Web.OAuth do
+ get "/authorize", OAuthController, :authorize
+ post "/authorize", OAuthController, :create_authorization
+ post "/token", OAuthController, :token_exchange
+ end
+
+ 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
+ end
+
+ scope "/api", Pleroma.Web do
+ pipe_through :config
+
+ get "/help/test", TwitterAPI.UtilController, :help_test
+ post "/help/test", TwitterAPI.UtilController, :help_test
+ get "/statusnet/config", TwitterAPI.UtilController, :config
+ get "/statusnet/version", TwitterAPI.UtilController, :version
+ end
+