Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ruggero D'Alò
    @Arguggi
    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 ?
    klappvisor
    @klappvisor
    Hi, not necessarily. when it's only a few parameters it's OK to use query parameters
    actually I have both cases
    Yuriy Syrovetskiy
    @cblp
    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
    @cblp
    so
    getMe_ :: Token -> ClientM GetMeResponse -- not exported
    Web.Telegram.API.Monad.getMe :: Client GetMeResponse
    Web.Telegram.API.getMe :: Token -> Manager -> IO (Either ServantError GetMeResponse)
    CyrusTCrumples
    @CyrusTCrumples
    image.png
    Is that a really appropriate type?
    Yuriy Syrovetskiy
    @cblp
    obviously no
    CyrusTCrumples
    @CyrusTCrumples

    What about uuh

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

    etc etc etc

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