Esempio n. 1
0
        // POST https://api.line.me/v2/bot/profile/{userID}
        public Profile GetProfile(string userID, string channelAccessToken)
        {
            string  jsStr   = WebRequestHelper.GetLineApi(LINE_URL + "/profile/" + userID, channelAccessToken);
            Profile profile = JsonConvert.DeserializeObject <Profile>(jsStr);

            return(profile);
        }
Esempio n. 2
0
        // POST https://api.line.me/v2/bot/group/{groupID}/members/ids
        // Get group member user IDs
        public GroupMember GetGroupMemberID(string groupID, string channelAccessToken, string start = "")
        {
            if (!string.IsNullOrEmpty(start))
            {
                start = "?start=" + start;
            }

            string      jsStr = WebRequestHelper.GetLineApi(LINE_URL + "/group/" + groupID + "/members/ids" + start, channelAccessToken);
            GroupMember gm    = JsonConvert.DeserializeObject <GroupMember>(jsStr);

            return(gm);
        }
Esempio n. 3
0
        // POST https://api.line.me/v2/bot/message/{messageId}/content
        public byte[] GetContent(string messageId, string channelAccessToken)
        {
            string str = WebRequestHelper.GetLineApi(LINE_URL + "/message/" + messageId + "/content", channelAccessToken);

            return(Encoding.Default.GetBytes(str));
        }