handle switching endpoints for realtime api requests, resolves #38
Merge branch 'realtime'