Chat object

Methods: Chat settings | Create chat message | Delete a chat message | Update a chat message | Create a chat message |

init

init

Chat settings

Input parameters

Required parameters:

  • String apikey (API key)
  • String code (Live event code)

Optional parameters:

  • Boolean enabled (Turn chat On/Off); Values are 1 and 0
  • Integer last_rows (Number of last messages from the history)
  • String default_message (Default message before chat messages)
  • String owner_nickname (Admin Nickname); Limit is 100 letters.
  • Boolean show_users (Show users list button in the chat)

Sample query:

https://boomstream.com/api/chat/init?apikey=[API_KEY]&code=XXXXXXXX&enabled=1&owner_nickname=Administrator&last_rows=10&default_message=Start%20message

Sample response:

<?xml version="1.0" encoding="utf-8"?>
<Response>
    <IsEnabled>true</IsEnabled>
    <SaveNickname>true</SaveNickname>
    <ShowUsers>false</ShowUsers>
    <OwnerNickname>User</OwnerNickname>
    <LastRows>10</LastRows>
    <DefaultMessage>Message</DefaultMessage>
    <Status>Success</Status>
    <Version>1.0</Version>
    <Versions>
        <Item>
            <version>1.0</version>
            <description>Boomstream API v.1.0 loads by default</description>
        </Item>
        <Item>
            <version>1.1</version>
            <description>Boomstream API v.1.1. 
Add &amp;ver=1.1 to the HTTP request to use it. 
Change log: it is changed the response format for the method - ppv/listBuyers</description>
        </Item>
    </Versions>
    <RequestURI>/api/chat/init?apikey=286b9d5caba7ff5f013c814d0ec60a8e&amp;code=cff3vgXP&amp;enabled=1&amp;owner_nickname=User&amp;last_rows=10&amp;default_message=Message&amp;show_users</RequestURI>
</Response>

createMessage

Create a chat message.

Input parameters

Обязательные параметры:

  • String apikey (API key)
  • String code (Live event code)
  • String code_message (Chat message code)
  • String message (Message text)

Sample query:

https://boomstream.com/api/chat/createMessage?apikey=[API_KEY]&code=XXXXXXXX&username=user&message=test

Sample response:

<?xml version="1.0" encoding="utf-8"?>
<Response>
    <Message>Message is created</Message>
    <Status>Success</Status>
    <Version>1.0</Version>
    <Versions>
        <Item>
            <version>1.0</version>
            <description>Boomstream API v.1.0 loads by default</description>
        </Item>
        <Item>
            <version>1.1</version>
            <description>Boomstream API v.1.1. 
Add &amp;ver=1.1 to the HTTP request to use it. 
Change log: it is changed the response format for the method - ppv/listBuyers</description>
        </Item>
    </Versions>
    <RequestURI>/api/chat/createMessage?apikey=286b9d5caba7ff5f013c814d0ec60a8e&amp;code=cff3vgXP&amp;username=usr&amp;message=Test</RequestURI>
</Response>

info

info

Chat message info

Input parameters

Required parameters:

  • String apikey (API ключ)
  • String code (Код трансляции)

Optional parameters:

  • Date start (Start date as YYYY-MM-DD, for example 2020-01-01); A week ago from the end date by default.
  • Date end (End date as YYYY-MM-DD, for example 2020-05-01); Current date by default.
  • String order (Sort of output); Options of sorting are: asc (to increase), desc (to decrease). By default is asc. Parameter is case - insensitive.
  • Integer page (Page of output); By default is page=1.

Sample query:

https://boomstream.com/api/chat/info?apikey=[API_KEY]&code=XXXXXXXX&start=2019-01-01&end=2020-05-21&order=asc

Sample response:

<?xml version="1.0" encoding="utf-8"?>
<Response>
    <Period>01.01.2021 - 01.12.2021</Period>
    <Start>01.01.2021</Start>
    <End>01.12.2021</End>
    <Page>0</Page>
    <PageLimit>1000</PageLimit>
    <PageCount>0</PageCount>
    <ItemCount>0</ItemCount>
    <ItemFormat>
        <date>Date</date>
        <code>Message code</code>
        <nickname>Nickname</nickname>
        <identity>Identity of user</identity>
        <message>Message</message>
    </ItemFormat>
    <Items/>
    <Status>Success</Status>
    <Version>1.0</Version>
    <Versions>
        <Item>
            <version>1.0</version>
            <description>Boomstream API v.1.0 loads by default</description>
        </Item>
        <Item>
            <version>1.1</version>
            <description>Boomstream API v.1.1. 
Add &amp;ver=1.1 to the HTTP request to use it. 
Change log: it is changed the response format for the method - ppv/listBuyers</description>
        </Item>
    </Versions>
    <RequestURI>/api/chat/info?apikey=286b9d5caba7ff5f013c814d0ec60a8e&amp;code=cff3vgXP&amp;start=2021-01-01&amp;end=2021-12-01&amp;order=asc&amp;page</RequestURI>
</Response>

updateMessage

Update a chat message.

Input parameters

Обязательные параметры:

  • String apikey (API ключ)
  • String code (Код трансляции)
  • String code_message (Код сообщения)
  • String message (Сообщение)

Sample query:

https://boomstream.com/api/chat/updateMessage?[API_KEY]&code=XXXXXXXX&code_message=[CODE_MESSAGE]&message=update

Sample response:

<?xml version="1.0" encoding="utf-8"?>
<Response>
    <date>2021-11-03 11:23:54</date>
    <codeMessage>MZDupnoSVWYDW77jnWrKQCmAiRA7aSqb</codeMessage>
    <nickname>1</nickname>
    <identity>admin@boomstream.com</identity>
    <isOwner>false</isOwner>
    <Status>Success</Status>
    <Version>1.0</Version>
    <Versions>
        <Item>
            <version>1.0</version>
            <description>Boomstream API v.1.0 loads by default</description>
        </Item>
        <Item>
            <version>1.1</version>
            <description>Boomstream API v.1.1. 
Add &amp;ver=1.1 to the HTTP request to use it. 
Change log: it is changed the response format for the method - ppv/listBuyers</description>
        </Item>
    </Versions>
    <RequestURI>/api/chat/updateMessage?apikey=286b9d5caba7ff5f013c814d0ec60a8e&amp;code=cff3vgXP&amp;code_message=MZDupnoSVWYDW77jnWrKQCmAiRA7aSqb&amp;message=upd</RequestURI>
</Response>

deleteMessage

Delete a chat message

Input parameters

Required parameters:

  • String apikey (API key)
  • String code (Live event code)
  • String code_message (Chat message code)

Sample query:

https://boomstream.com/api/chat/deleteMessage?[API_KEY]&code=XXXXXXXX&code_message=[CODE_MESSAGE]

Sample response:

<?xml version="1.0" encoding="utf-8"?>
<Response>
    <Message>Chat message is removed from history</Message>
    <Status>Success</Status>
    <Version>1.0</Version>
    <Versions>
        <Item>
            <version>1.0</version>
            <description>Boomstream API v.1.0 loads by default</description>
        </Item>
        <Item>
            <version>1.1</version>
            <description>Boomstream API v.1.1. 
Add &amp;ver=1.1 to the HTTP request to use it. 
Change log: it is changed the response format for the method - ppv/listBuyers</description>
        </Item>
    </Versions>
    <RequestURI>/api/chat/deleteMessage?apikey=286b9d5caba7ff5f013c814d0ec60a8e&amp;code=cff3vgXP&amp;code_message=MZDupnoSVWYDW77jnWrKQCmAiRA7aSqb</RequestURI>
</Response>