public MessageList ListMessages(string status = "", int limit = 20, int offset = 0)
        {
            var messageLists = new MessageLists();
            var messageList  = new MessageLists(new MessageList {
                Limit = limit, Offset = offset, Status = status
            });

            restClient.Retrieve(messageList);
            return(messageList.Object as MessageList);
        }
Esempio n. 2
0
    public static void SaveData(StatBars stats, Clock clock, MessageLists messageLists)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/player.binary";
        FileStream      stream    = new FileStream(path, FileMode.Create);
        PlayerData      data      = new PlayerData(stats, clock, messageLists);

        formatter.Serialize(stream, data);
        stream.Close();
    }
        public ConversationMessageList ListConversationMessages(string conversationId, int limit = 20, int offset = 0)
        {
            ParameterValidator.IsNotNullOrWhiteSpace(conversationId, "conversationId");

            var resource = new MessageLists();

            var list = (ConversationMessageList)resource.Object;

            list.Limit          = limit;
            list.Offset         = offset;
            list.ConversationId = conversationId;

            restClient.Retrieve(resource);

            return(resource.Object as ConversationMessageList);
        }