public JodelMainData ReloadMain() { Karma = MyJodel.GetKarma(); JodelPosts = MyJodel.GetPostLocationCombo(); return(JodelPosts); }
public string Post(string message, JodelPost.PostColor color = JodelPost.PostColor.Random, bool home = false) { string postId = MyJodel.Post(message, color: color, home: home); JodelPosts = MyJodel.GetPostLocationCombo(); return(postId); }
public void Start() { MyJodel.GetUserConfig(); MyJodel.GetRecommendedChannels(); Karma = MyJodel.GetKarma(); JodelPosts = MyJodel.GetPostLocationCombo(stickies: true); }
public JodelMainData GetPostChannelCombo(string channel, bool home = false) { string jsonString = Links.GetChannelCombo.ExecuteRequest(Account, new Dictionary <string, string> { { "channel", channel }, { "home", home.ToString().ToLower() } }); JsonJodelsFirstRound.RootObject jodels = JsonConvert.DeserializeObject <JsonJodelsFirstRound.RootObject>(jsonString); JodelMainData data = new JodelMainData { Max = jodels.max }; data.RecentJodels.AddRange(jodels.recent.Select(r => new JodelPost(r))); data.RepliedJodels.AddRange(jodels.replied.Select(r => new JodelPost(r))); data.VotedJodels.AddRange(jodels.voted.Select(v => new JodelPost(v))); return(data); }
public JodelMainData GetPostLocationCombo(bool stickies = false, bool home = false) { string jsonString = Links.GetPostsCombo.ExecuteRequest(Account, new Dictionary <string, string> { { "lat", Account.Place.Latitude.ToString("F", CultureInfo.InvariantCulture) }, { "lng", Account.Place.Longitude.ToString("F", CultureInfo.InvariantCulture) }, { "stickies", stickies.ToString().ToLower() }, { "home", home.ToString().ToLower() } }); JsonJodelsFirstRound.RootObject jodels = JsonConvert.DeserializeObject <JsonJodelsFirstRound.RootObject>(jsonString); JodelMainData data = new JodelMainData { Max = jodels.max }; data.RecentJodels.AddRange(jodels.recent.Select(r => new JodelPost(r))); data.RepliedJodels.AddRange(jodels.replied.Select(r => new JodelPost(r))); data.VotedJodels.AddRange(jodels.voted.Select(v => new JodelPost(v))); return(data); }