Jump to content
hubinator

How to get chat messages using API?

Recommended Posts

Hey there! 

I don't have any knowledge in this, but @Dan created a topic on this on our sister-site Stake.com so I just copy-pasted it here. I hope it will help. :) 

And if this is not it actually, I hope Dan will be willing to explain. :) 

Take care! :) 

Examples

Send Message Mutation (sends a message to a chat channel)  [Authenticated]

mutation {
  sendMessage(chatId: "chat_id_goes_here", message: "message_goes_here") {
    id
    user {
      name
    }
  }
}

 

 

Public Chats Query (search for all public chat channels) [Unrestricted]

query {
  publicChats {
    id
    name
  }
}

Bet List Query (lookup a players bet history)  [Unrestricted]

{
  user(name: "dan") {
    betList(limit: 50, offset: 0) {
      iid
      game
      payout
      amountMultiplier
      payoutMultiplier
      amount
      currency
      createdAt
    }
  }
}

Roll Dice (play stakes dice game) [Authenticated]

mutation {
  diceRoll (amount: 1, target: 50, condition: above, currency: doge) {
    iid
    payout
    currency
    game
    nonce
  }
}

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×