crisp-im / ruby-crisp-api

💎 Crisp API Ruby Wrapper
https://docs.crisp.chat/guides/rest-api/
MIT License
16 stars 7 forks source link

New idea: "Get A Conversation" method contains neither the number of messages nor the number of pages #16

Closed ydakuka closed 1 year ago

ydakuka commented 1 year ago

https://docs.crisp.chat/references/rest-api/v1/#get-a-conversation

eliottvincent commented 1 year ago

Hello there, can you please elaborate?

ydakuka commented 1 year ago

@eliottvincent it must be implemented on your side.

eliottvincent commented 1 year ago

I still don't understand :)

ydakuka commented 1 year ago

@eliottvincent GET /v1/website/{website_id}/conversation/{session_id} request contains a lot of messages which I can get through GET /v1/website/{website_id}/conversation/{session_id}/messages request (with page_size = 20). I need to know how many messages exist?

eliottvincent commented 1 year ago

You can't know in advance the number of messages. When calling /messages:

You can see examples in our API ref: https://docs.crisp.chat/references/rest-api/v1/#get-messages-in-conversation

Screen Shot 2023-07-04 at 13 04 56@2x
ydakuka commented 1 year ago

You can't know in advance the number of messages. When calling /messages:

Yes, you're right, but I want to know the number of messages when calling GET /v1/website/{website_id}/conversation/{session_id} using new useful field (e.g. total_messages).

eliottvincent commented 1 year ago

That is simply not possible and we have not planned to implement that, for now.