Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Ruggero D'Alò
    Hi, I just noticed that I was adding endpoints and using QueryParams but in your first endpoints you created new data types in Requests.hs. Should all endpoints by something like : Token -> "endpoint" -> ReqBody Request -> POST '[JSON] Response ?
    Hi, not necessarily. when it's only a few parameters it's OK to use query parameters
    actually I have both cases
    Yuriy Syrovetskiy
    hi, I want to test my program against a mock telegram server, so I need to pass somehow my telegramBaseUrl
    what about exporting ClientM and IO versions of API methods from different modules?
    or even create a new monad newtype Client = ReaderT Token ClientM
    Yuriy Syrovetskiy
    getMe_ :: Token -> ClientM GetMeResponse -- not exported
    Web.Telegram.API.Monad.getMe :: Client GetMeResponse
    Web.Telegram.API.getMe :: Token -> Manager -> IO (Either ServantError GetMeResponse)
    Is that a really appropriate type?
    Yuriy Syrovetskiy
    obviously no

    What about uuh

    data Update = Update Int UpdateType
    data UpdateType
      = MessagePostUpdate Message
      | MessageEditUpdate Message
      | ChannelPostUpdate Message
      | InlineQueryUpdate InlineQuery

    etc etc etc

    Barry Moore
    Is there a full example of a working bot somewhere?
    I found that, but it looks to be out of date. I also incorporated