public void get_category_index()
        {
            string str = url + "?json=get_category_index";
            CategoryIndex categories = new CategoryIndex();
            WordpressEventArgs args = new WordpressEventArgs(WordpressDataType.CategoryIndex, HttpStatusCode.OK, true);
            Helper.HttpWebRequestDownload((asynchronousResult) =>
            {
                HttpWebRequest request =
                    (HttpWebRequest)asynchronousResult.AsyncState;
                HttpWebResponse response =
                    (HttpWebResponse)request.EndGetResponse(asynchronousResult);

                if (response.StatusCode == HttpStatusCode.OK)
                {
                    try
                    {
                        using (StreamReader streamReader1 =
                            new StreamReader(response.GetResponseStream()))
                        {
                            string resultString = streamReader1.ReadToEnd();

                            categories = Helper.Deserialize<CategoryIndex>(resultString);

                        }
                    }
                    catch
                    {
                        args.Success = false;
                    }
                }
                else
                {
                    args.ResponseCode = response.StatusCode;
                    args.Success = false;
                }

                Deployment.Current.Dispatcher.BeginInvoke(new Action(() =>
                {
                    try
                    {
                        get_category_index_complete.Invoke(categories, args);
                    }
                    catch
                    {
                    }
                }));
            }, str);
        }
Example #2
0
 public void create_post(string nonce, string status = null, string title = null, string content = null, string author = null, CategoryIndex ci = null, TagIndex ti = null)
 {
     throw new NotImplementedException();
 }