Get Started with Streamdata.io

It only takes five steps for you to begin experiencing the power of realtime streaming data.

CMS on desktop computer screen

Step 1

Sign up on Streamdata.io.

 

Select default app or create a new one and get your AppToken under Settings > Security.

Pick Your Platform

JavaScript
iOS
Android

<script src="/js/streamdataio.min.js?x69489"></script>

Step 2

Install Streamdata.io.

var myEventSource = streamdataio.createEventSource("http://mysite.com/myJsonRestService", "[YOURTOKEN]");

Step 3

Connect to your API through Streamdata.io.

myEventSource.onData(function(data){
     // initialize your data with the initial snapshot    
}).onPatch(function(data){         
     // update the data with the provided patch
});

Step 4

Register your callbacks and update your UI when receiving data.

last_step

That's it!

You have officially created a streaming API to feed your animated UI with realtime updates – and Streamdata.io will start polling your API and sending you new data when it's available.

Step 2

Install Streamdata.io. Include the following dependencies in your project

// Initialize the TRVSEventSource event source with URL string
URL = [NSURL URLWithString:"https://streamdata.motwin.net/http://mysite.com/myJsonRestService?X-Sd-Token=[YOURTOKEN]"];
eventSource = [[TRVSEventSource alloc] initWithURL:URL];
eventSource.delegate = self;

// Open the event source
[eventSource open];

Step 3

Connect to your API through Streamdata.io.

- (void)eventSource:(TRVSEventSource *)eventSource didReceiveEvent:(TRVSServerSentEvent *)anEvent
{
  if([anEvent.event isEqualToString:@"data"]==TRUE) 
  {
      // initialize your data with the initial snapshot
  } else if ([anEvent.event isEqualToString:@"patch"]==TRUE) 
  {
      // update data with patch
  }
}

Step 4

Register your callbacks and update your UI when receiving data.

last_step

That's it!

You have officially created a streaming API to feed your animated UI with realtime updates – and Streamdata.io will start polling your API and sending you new data when it's available.

Step 2

Install Streamdata.io. Inlcude the following dependencies in your project

String streamdataPrefix = "https://streamdata.motwin.net/";
String myApi = "http://mysite.com/myJsonRestService";
Map<String, String> header = new HashMap<String, String>();
header.put("X-Sd-Token", sdToken);
eventSource = new EventSource(new URI(streamdataPrefix), new URI(myApi), this, header);
eventSource.connect();

Step 3

Connect to your API through Streamdata.io.

@Override
public void onMessage(String event, MessageEvent message) throws IOException {
    if ("data".equals(event)) {
        // initialize your data with the initial snapshot
    } else if ("patch".equals(event)) {
        // update data with patch
    } 
}

Step 4

Register your callbacks and update your UI when receiving data.

last_step

That's it!

You have officially created a streaming API to feed your animated UI with realtime updates – and Streamdata.io will start polling your API and sending you new data when it's available.

One Step Further

Want to Get Started?

Sign Up

Have a questions about Streamdata.io

Get the Answer