Git Product home page Git Product logo

deno-slack-hub's Introduction

File with heading

You want to use other peoples code to do your work?

We definitely do! The hub enables its users to use Slack Connectors in TypeScript, offloading the cost of code maintenance and OAuth management to other developers. Interact with APIs from Google, Salesforce, GitHub, Giphy and more with a minimal amount of code and offload your credential management to Slack.

Requirements

Versioning

Disclaimer: prior to the release of 1.x.x this package is considered unstable and will not adhere to Semantic Versioning

Releases for this repository follow the SemVer versioning scheme. The HUB's contract is determined by the top-level exports from src/mod.ts and src/types.ts. Exports not included in these files are deemed internal and any modifications will not be treated as breaking changes. As such, internal exports should be treated as unstable and used at your own risk.

Usage

Getting started

Follow our quick start guide for modular Slack apps

Samples

Take a look at some our sample & template projects to get started with the latest version of the deno-slack-sdk

Consumption

Import the latest version of deno-slack-hub in your next gen Deno project, we recommend doing this through the import_map.json.

{
  "imports": {
    "deno-slack-sdk/": "https://deno.land/x/[email protected]/",
    "deno-slack-api/": "https://deno.land/x/[email protected]/",
    "deno-slack-hub/": "https://deno.land/x/[email protected]/"
  }
}

Using connectors as a step in a coded workflow

Using connectors as a step in a coded workflow

import { DefineWorkflow, Schema } from "deno-slack-sdk/mod.ts";
import { Connectors } from "deno-slack-hub/mod.ts";

const GifWorkflow = DefineWorkflow({
  callback_id: "post_random_gif",
  title: "Workflow to post a random gif in a channel",
  description: "A workflow that post a random gif in the channel it is invoked",
  input_parameters: {
    properties: {
      channel_id: {
        type: Schema.slack.types.channel_id,
      },
    },
    required: ["channel_id"],
  },
});

const getRandomGifStep = GifWorkflow.addStep(
  Connectors.Giphy.functions.GetRandomGif,
  {
    rating: "g",
  },
);

GifWorkflow.addStep(Schema.slack.functions.SendMessage, {
  channel_id: GifWorkflow.inputs.channel_id,
  message: getRandomGifStep.outputs.gif_title_url,
});

export default GifWorkflow;

Contributions

We welcome contributions from everyone! Please check out our Contributor's Guide for how to contribute in a helpful and collaborative way.

License

deno-slack-hub's People

Contributors

filmaj avatar github-actions[bot] avatar mac2flip avatar williambergamin avatar

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.