Giter VIP home page Giter VIP logo

Comments (7)

christhekeele avatar christhekeele commented on May 19, 2024

Was thinking about taking on a couple of these issues. For this one, do you want to turn Slack itself into a struct, or put it somewhere else to avoid cluttering the macro-ful module, like Slack.Conn?

from elixir-slack.

christhekeele avatar christhekeele commented on May 19, 2024

Also, how do you feel other structs, like Slack.Message, Slack.User. Slack.Channel, etc?

from elixir-slack.

BlakeWilliams avatar BlakeWilliams commented on May 19, 2024

I would move the Slack state first, but it would probably be in its own module. I was initially thinking Slack.State but could be convinced of other names.

I think once that's done it'll make sense to re-evaluate the idea of Slack.Message, user, etc.

from elixir-slack.

christhekeele avatar christhekeele commented on May 19, 2024

Both Slack.Struct and Slack.State seem a little nondescript, but I can't think of a great alternative. Slack.API is kind of inaccurate. Slack.Conn and Slack.Client work better, but kind of already occupy a space in the domain model (websocket conn + client).

from elixir-slack.

christhekeele avatar christhekeele commented on May 19, 2024

Alternatively, flip it around such that the state is a %Slack{} struct and library gets consumed with use Slack.API (or Slack.Behaviour, Slack.Client)

from elixir-slack.

christhekeele avatar christhekeele commented on May 19, 2024

Slack.State feels pretty weird because all the callbacks end up with a Slack.State and a user-defined state right next to each other in the params.

from elixir-slack.

BlakeWilliams avatar BlakeWilliams commented on May 19, 2024

I don't think it's too weird. 'Slack.Client' isn't bad either.

from elixir-slack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.