REST api or webservice?


(Mikakun) #1

apologize i don’t know much about discourse & i’m not sure it’ll fit my requirements

I want to develop a re-usable web application pretty much based on a forum (& its auth features) & a QA & extra features of my own. that app would work on shared or any kind of server completely independently of the discourse server i’d set-up one time (i’m assuming i can host as many forum as i want on one instance of discourse).

1 - is there a rest api in discourse & if it’s in ror only would it be easy for me complete noob in ror to convert it in php - so i can keep dev with my framework ? or could i set-up some web services easily from the discourse server (& without having to worry when there is a discourse update)

1 - is there a Question/answer stackOverflow style feature already available in discourse ?


(Matt Palmer) #2
  1. docs.discourse.org, and no, “converting” Discourse to PHP would not be easy.
  2. I believe there are plugins to make Discourse somewhat more SO-like; there is also the “Solved” plugin, for simpler use cases.

(Mikakun) #3

thanks for your answer !

however i didn’t mean converting discourse, i meant having a (minimal) rest api in php to be used from a website server (not the discourse server) that would not require RoR to :

  • deliver anything from the website server that doesn’t add/remove/update anything from the forum to the client (first page of session, page reload, SE bots )
  • be able to cache contents on that website server - with obviously some extra js to handle user events so to manage up to date cache on website server

(so only participating users would ever query the discourse server)

or are you saying there aren’t straightforward way to use/integrate discourse within a php/sql app & i should look elsewhere ? what about webservices ?


(Jeff Atwood) #4

Did you look at http://docs.discourse.org per the previous reply?


(Mikakun) #5

yeah i did look but didn’t read, it is overwhelming for me, feels like hours of reading while someone might be able to answer in a couple of mins

plus there is no result for web services


#7

If you are confident in PHP and using Rest APIs then you should have no issue in developing using your framework to talk to discourse using its API - its not ROR specific. The docs they referred you goes through each of the API calls available to discourse and how to use it with examples of the GET / POST requests and the response that you would potentially receive.