public static List <Intention> GetIntentions() { if (intentions == null || intentions.Count == 0) { intentions = ProxyHelper.SendRequest <List <Intention> >("HuggyMessages", "Intentions", HttpMethod.Get).ToList(); } return(intentions); }
public static Card FindCard(string text, List <string> lastTextIds) { var card = ProxyHelper.SendRequest <List <Card> >("bot/TestBot", "talktobot", HttpMethod.Post, new Command { text = text, top = 1 }); return(card.LastOrDefault()); }
private static List <Card> GetCards(int version, string intentionId) { var parameters = new List <object> { "forRecipient", "BotFriends", "andIntention", intentionId, new KeyValuePair <string, string>("nbcards", "6") }; if (version != 0) { parameters.Add(new KeyValuePair <string, string>("version", version.ToString())); } var cards = ProxyHelper.SendRequest <List <Card> >("popular/TestBot", "IdeasOfTheDay", HttpMethod.Get, parameters.ToArray()); return(cards); }
private static Card GetNewCard(List <string> lastTextIds, string intentionId) { var card = ProxyHelper.SendRequest <List <Card> >("popular/TestBot", "IdeasOfTheDay", HttpMethod.Get, "forRecipient", "BotFriends", "andIntention", intentionId, new KeyValuePair <string, string>("nbcards", "1")); return(card.LastOrDefault()); }