import store from '@/store'

export default class Url {
    static urls = {
        'conversations':        "conversations/",
        'messages':             "messages/",
        'add_message':          "messages/add/",
        "update_conversation":  "conversations/update/",
    }

    static getBaseUrl () {
        return "https://api.messenger.klinkerapps.com/";
    }

    static getApiVersion () {
        return "api/v1/";
    }

    static getAccountParam () {
        return "?account_id=" + store.state.account_id;
    }

    static get (name) {
        return Url.getBaseUrl() + Url.getApiVersion() + Url.urls[name];
    }
}


@@ -77,17 +77,17 @@
         
-'
+%22
 conversa
@@ -91,17 +91,17 @@
 rsations
-'
+%22
 :       
@@ -131,17 +131,17 @@
     
-'
+%22
 messages
 ':  
@@ -136,17 +136,17 @@
 messages
-'
+%22
 :       
@@ -172,17 +172,17 @@
         
-'
+%22
 add_mess
@@ -184,17 +184,17 @@
 _message
-'
+%22
 :       
@@ -266,24 +266,66 @@
 s/update/%22,%0A
+        %22websocket%22:            %22stream%22,%0A
     %7D%0A%0A    s
@@ -366,16 +366,8 @@
 rn %22
-https://
 api.
@@ -580,24 +580,126 @@
 et (name) %7B%0A
+%0A        let protocol = %22https://%22;%0A        if(name == %22websocket%22)%0A            protocol = %22wss://%22;%0A%0A
         retu
@@ -700,16 +700,27 @@
   return
+ protocol +
  Url.get

Add websocket URI