Giter VIP home page Giter VIP logo

teams_connector's People

Contributors

luckeu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

teams_connector's Issues

Example not working?

Hi there,
thank you for your awesome work.

I have a little problem here: the test_card works perfectly with out Teams-Channel.
But the following does not work for me:

Send a card with a list of facts

content = {
title: "Teams Connector Readme",
subtitle: "A list of facts",
facts: {
"Usage": "Testing the facts Card"
}
}
TeamsConnector::Notification::Message.new(:facts_card, "This is a summary", content).deliver_later

C:/Users/username/.gem/gems/teams_connector-0.1.5/templates/teams_connector/facts_card.json.erb:11:in deliver_later': undefined method present?' for {:Usage=>"Testing the facts Card"}:Hash (NoMethodError)
from C:/SVSW/Ruby/lib/ruby/2.7.0/erb.rb:905:in eval' from C:/SVSW/Ruby/lib/ruby/2.7.0/erb.rb:905:in result'
from C:/Users/username/.gem/gems/teams_connector-0.1.5/lib/teams_connector/notification.rb:21:in deliver_later' from tc.rb:23:in

'

Do you have any ideas or tips?

Thank you!

--Werner.

Notification PaperTrail

Many systems require a persistent papertrail of events and actions for traceability.

Currently TeamsConnector does not log or store a record when a notification was sent and whether this was successful or not.

To fix this a logger should be configurable which allows the output to different targets.

  • stdout
  • File
  • Rails ActiveRecord
  • Other (user configurable)

Concept

During configuration a logger can be defined. The interface is similar to a Rails ActiveRecord to allow easy integration without a layer in between.

This logger is a class that defines the class method ::create for initializing a new notification entry. For persistent papertrails the result must contain an id that will be passed to the template (e.g to display it in the notification).
The entry will be updated after the HTTP request is made. For this the class must support ::find(id) and the object must implement the #update method.

The attributes of the entry are:

  • id (integer/string)
  • target_channels (string)
  • created_at, updated_at (timestamps)
  • template (string)

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.