Exemple #1
0
        public ResultTag PostTags(string content)
        {
            string    api  = $"tags/create?access_token={this.Access_token}";
            string    r    = this.Post(api, content);
            JObject   json = JObject.Parse(r);
            ResultTag tag  = JsonConvert.DeserializeObject <ResultTag>(json.Value <JObject>("tag").ToString());

            return(tag);
        }
Exemple #2
0
        private void btnCreateTag_Click(object sender, EventArgs e)
        {
            Tags tags = new Tags();

            tags.tag.name = this.txtTagName.Text;

            ResultTag tag = DevCommon.Cloud.PostTags(tags.ToString());

            if (!string.IsNullOrEmpty(tag.Id))
            {
                this.MsgBox($"创建成功,ID:{tag.Id}");
            }
            else
            {
                this.MsgBox($"创建失败,errcode:{tag.ErrCode},errmsg:{tag.ErrMsg}");
            }
        }