API



  • hey Friends 🙂

    We are using nodebb as an internal communication tool. we would like to be able to send infos from our trello board to the forum, when tickets have been set up, changed or finished.
    Is there anything planed to integrate something like a REST api?
    If not right now, i think i will try to establish some tool that writes directly to the db (mongodb in my case)

    cheers
    ToM


  • Plugin & Theme Dev

    Hey ToM 🙂

    As far I know it's only possible to get information of the board via API (prepend api/ to any URL like https://community.nodebb.org/api/topic/1280/api), not to set like you want to (if I understood you correctly).

    I think better than creating a tool that writes into the db directly would be writing a plugin for NodeBB to do so. In this case you should be able to require the NodeBB-core services to create new posts and whatever you want.
    Some pros for writing a plugin would be:

    • DB-independent (maybe you want to switch over to redis some time)
    • javascript instead of DB-dependent query language
    • you could publish the plugin therefor other users get the comfort out of it

    greetings
    FDG



  • @frissdiegurke
    hey 🙂 and thanks for the quick responds

    ja you are totally correct - that would be the right way to do it 😉
    the only thing i'm concerned about right know is, that i'm in a hurry and never have worked with node.js before. i have my knowledge and tools together in python, flask, mongodb
    but as i wanted to have a look at metor as well this might be a nice challange for me to get into node.js and write a nice plugin for your awesome forum 🙂

    i'll come back to you and let you know whats going on.
    cheers ToM


  • GNU/Linux Admin

    @frissdiegurke @Thomas-Krickl Such a system could be created as a plugin if you leverage Trello Webhooks.

    Every time something changes on the trello board, you can have it ping your NodeBB. The plugin can create new routes (new as of 0.4.0!) in the "action:app.load" hook, so you can create a new route /trello or what have you, that listens for incoming requests from Trello.

    Something similar could be done for GitHub as well.



  • @julian nice 🙂 that would really be a very nice way to do it - so i don't have to watch trello - it would trigger nodebb


Log in to reply
 

Suggested Topics

  • 1
  • 7
  • 3
  • 1
  • 2
| |