1

How-to create RoR API-only application with ActionCable live updates?

Firstly I don't have any experience in Building API's and Front End Technologies, recently I started API's build.

I've checked lot of documents, and no use.

Kindly, Help me with some good resources or stuff which includes - how we need to subscribe, publish and broadcast using ActionCable in API-only application.

Edit:- 1 Here I need help regarding how we can connect, subscribe, publish and broadcast data(in JSON) to the Applications built with other technologies like Android, iOS, Windows(MFC), Web App, etc..,

  • What exactly you want to build with action cable and API – Veeru Oct 25 '16 at 13:13
  • I planning API for Live Updates(something Multiplayer Game). API(Developed in RoR) and Clients will be any other like Android, iPhone, Website, MFC Application, etc., I need to stream data to this clients using ActionCable Feature. In-application I have checked Its working, Now i need to serve for rest. So I am trying to create an API which return results in JSON. I don't experience in Front End Technologies. – Modi Ranga Nayakulu Oct 26 '16 at 04:17

1 Answers1

0

REST APIs can be called using basic HTTP infrastructure, there is no point of calling an HTTP request, if all you want to do is let it subscribe to a channel and send data over it which is pointless as the client side won't be updated for all the channel subscribers.

You can go ahead and use actioncable as API which is properly explained in the answer over here, :-

How to use ActionCable as API

Vaibhav Maheshwari
  • 380
  • 1
  • 3
  • 18