/// <summary> /// Gets the thread. /// </summary> /// <returns>The thread.</returns> /// <param name="board">Boad.</param> /// <param name="threadNumber">Thread number.</param> public static Thread GetThread(string board, int threadNumber) { Thread thread = HTTPUtil.DownloadObject <Thread>(Constants.GetThreadUrl(board, threadNumber)); if (thread != null) { foreach (Post item in thread.Posts) { item.Board = board; } } return(thread); }
/// <summary> /// Gets thead root object. /// </summary> /// <returns>The thread page.</returns> /// <param name="board">Board.</param> /// <param name="page">Page.</param> public static ThreadRootObject GetThreadPage(string board, int page) { ThreadRootObject thread = HTTPUtil.DownloadObject <ThreadRootObject>(Constants.GetThreadPageUrl(board, page)); if (thread != null) { foreach (Thread item in thread.Threads) { foreach (Post post in item.Posts) { post.Board = board; } } } return(thread); }
/// <summary> /// Gets boards info. /// </summary> /// <returns>The board.</returns> public static BoardRootObject GetBoard() { return(HTTPUtil.DownloadObject <BoardRootObject>(Constants.BoardsUrl)); }
public static List <Page> GetPagesFromBoard(string board) { return(HTTPUtil.DownloadObject <List <Page> >(Constants.GetThreadsUrl(board))); }