wire-api-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.API.Routes.Public.Proxy

Synopsis

Documentation

type ProxyAPI = ProxyAPIRoute "giphy-path" ("giphy" :> ("v1" :> ("gifs" :> RawM))) :<|> (ProxyAPIRoute "youtube-path" ("youtube" :> ("v3" :> RawM)) :<|> (ProxyAPIRoute "gmaps-static" ("googlemaps" :> ("api" :> ("staticmap" :> RawM))) :<|> ProxyAPIRoute "gmaps-path" ("googlemaps" :> ("maps" :> ("api" :> ("geocode" :> RawM)))))) Source #

type ProxyAPIRoute name path = Named name (Summary (ProxyAPISummary name) :> ("proxy" :> path)) Source #

type family ProxyAPISummary name where ... Source #

API docs: if we want to make these longer, they won't clutter the routes above that they document.

youtube, google maps are only supported for old android. there is no strong reason to end support at any particular version, except the hope that old android won't need to support V4, and if nobody uses it, we shouldn't serve it. if you are a wire employee, see https://wearezeta.atlassian.net/wiki/spaces/ENGINEERIN/pages/685867582/Proxy+for+3rd+party+services for discussion.

Equations

ProxyAPISummary "giphy-path" = "proxy: `get /proxy/giphy/v1/gifs/:path`; see giphy API docs" 
ProxyAPISummary "youtube-path" = "[DEPRECATED] proxy: `get /proxy/youtube/v3/:path`; see youtube API docs" 
ProxyAPISummary "gmaps-static" = "[DEPRECATED] proxy: `get /proxy/googlemaps/api/staticmap`; see google maps API docs" 
ProxyAPISummary "gmaps-path" = "[DEPRECATED] proxy: `get /proxy/googlemaps/maps/api/geocode/:path`; see google maps API docs" 

data ProxyAPITag Source #

Instances

Instances details
ServiceAPI ProxyAPITag v Source #

FUTUREWORK(fisx): (1) the verb could be added to the swagger docs in the appropriate place here; it's always defined in the Summary, but the RawM doesn't allow to constrain it. (2) there should be a way to make this more type-safe: assertMethod in Proxy.API.Public could take a type-level string literal argument containing the method, and that argument could be funnelled there from the routing table somehow: `"spotify" :> "api" :> "token" :> OnlyMethod POST :> RawM`, and then the ServerT instance for OnlyMethod requires a proxy argument in the handler of the same type. Or something. (am i massifly over-engineering things here?)

Instance details

Defined in Wire.API.Routes.Public.Proxy

type ServiceAPIRoutes ProxyAPITag Source # 
Instance details

Defined in Wire.API.Routes.Public.Proxy

type SpecialisedAPIRoutes v ProxyAPITag Source # 
Instance details

Defined in Wire.API.Routes.Public.Proxy