91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 6.89MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-10-04
  • 語言: 其他
  • 標簽:

資源簡介

DDRobot - 釘釘自定義機器人消息推送

資源截圖

代碼片段和文件信息

using?Newtonsoft.Json;
using?OapiRobotTest.Model;
using?System;
using?System.Collections.Generic;
using?System.Configuration;
using?System.IO;
using?System.Linq;
using?System.Net;
using?System.Text;
using?System.Threading.Tasks;

namespace?OapiRobotTest
{
????public?class?OapiRobot
????{
????????public?static?string?dd_host?=?ConfigurationManager.AppSettings[“DDHost“];
????????public?static?string?RobotSendUrl?=?ConfigurationManager.AppSettings[“RobotSendUrl“];

????????///?
????????///?發起請求
????????///?

????????///?地址
????????///?數據
????????///?請求類型
????????///?
????????public?static?String?Request(string?url?string?data?string?reqtype)
????????{
????????????HttpWebRequest?web?=?(HttpWebRequest)HttpWebRequest.Create(dd_host?+?url);
????????????web.ContentType?=?“application/json“;
????????????web.Method?=?reqtype;
????????????if?(data.Length?>?0?&&?reqtype.Trim().ToUpper()?==?“POST“)
????????????{
????????????????byte[]?postBytes?=?Encoding.UTF8.GetBytes(data);
????????????????web.ContentLength?=?postBytes.Length;
????????????????using?(Stream?reqStream?=?web.GetRequestStream())
????????????????{
????????????????????reqStream.Write(postBytes?0?postBytes.Length);
????????????????}
????????????}
????????????string?html?=?string.Empty;
????????????using?(HttpWebResponse?response?=?(HttpWebResponse)web.GetResponse())
????????????{
????????????????Stream?responseStream?=?response.GetResponseStream();
????????????????StreamReader?streamReader?=?new?StreamReader(responseStream?Encoding.UTF8);
????????????????html?=?streamReader.ReadToEnd();
????????????}
????????????return?html;
????????}
????????///?
????????///?發送文本消息
????????///?

????????///?文本內容
????????///?@人員電話
????????///?是否@群所有成員
????????public?static?void?OapiRobotText(string?content?List?atMobiles?bool?isAtAll)
????????{
????????????TextModel?tModel?=?new?TextModel();
????????????tModel.at?=?new?atText();
????????????tModel.text?=?new?text();
????????????tModel.at.atMobiles?=?new?List();

????????????tModel.text.content?=?content;
????????????tModel.at.atMobiles.AddRange(atMobiles);
????????????tModel.at.isAtAll?=?isAtAll;
????????????tModel.msgtype?=?“text“;

????????????string?data?=?JsonConvert.Serializeobject(tModel);
????????????string?json?=?Request(RobotSendUrl?data?“POST“);
????????}
????????///?
????????///?發送link消息
????????///?

????????///?tle“>消息標題
????????///?消息內容。如果太長只會部分展示
????????///?點擊消息跳轉的URL
????????///?圖片URL
????????public?static?void?OapiRobotlink(string?title?string?text?string?messageUrl?string?picUrl)
????????{

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-01-02?11:56??DDRobot-master\
?????文件????????1000??2019-01-02?11:56??DDRobot-master\OapiRobot.sln
?????文件???????45056??2019-01-02?11:56??DDRobot-master\OapiRobot.suo
?????文件???????40960??2019-01-02?11:56??DDRobot-master\OapiRobot.v12.suo
?????目錄???????????0??2019-01-02?11:56??DDRobot-master\OapiRobotTest\
?????文件?????????419??2019-01-02?11:56??DDRobot-master\OapiRobotTest\App.config
?????目錄???????????0??2019-01-02?11:56??DDRobot-master\OapiRobotTest\Model\
?????文件????????2169??2019-01-02?11:56??DDRobot-master\OapiRobotTest\Model\ActionCardOverallModel.cs
?????文件????????2463??2019-01-02?11:56??DDRobot-master\OapiRobotTest\Model\ActionCardSingleModel.cs
?????文件????????1847??2019-01-02?11:56??DDRobot-master\OapiRobotTest\Model\FeedCardModel.cs
?????文件????????1604??2019-01-02?11:56??DDRobot-master\OapiRobotTest\Model\linkModel.cs
?????文件????????1354??2019-01-02?11:56??DDRobot-master\OapiRobotTest\Model\MarkDownModel.cs
?????文件????????1209??2019-01-02?11:56??DDRobot-master\OapiRobotTest\Model\TextModel.cs
?????文件????????9271??2019-01-02?11:56??DDRobot-master\OapiRobotTest\OapiRobot.cs
?????文件????????3334??2019-01-02?11:56??DDRobot-master\OapiRobotTest\OapiRobot.csproj
?????文件????????4330??2019-01-02?11:56??DDRobot-master\OapiRobotTest\Program.cs
?????目錄???????????0??2019-01-02?11:56??DDRobot-master\OapiRobotTest\Properties\
?????文件????????1350??2019-01-02?11:56??DDRobot-master\OapiRobotTest\Properties\AssemblyInfo.cs
?????目錄???????????0??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\
?????目錄???????????0??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\Debug\
?????文件??????675240??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\Debug\Newtonsoft.Json.dll
?????文件??????250244??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\Debug\Newtonsoft.Json.pdb
?????文件??????688142??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\Debug\Newtonsoft.Json.xml
?????文件???????14336??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\Debug\OapiRobotTest.exe
?????文件?????????408??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\Debug\OapiRobotTest.exe.config
?????文件???????19968??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\Debug\OapiRobotTest.pdb
?????文件???????24224??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\Debug\OapiRobotTest.vshost.exe
?????文件?????????408??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\Debug\OapiRobotTest.vshost.exe.config
?????文件?????????479??2019-01-02?11:56??DDRobot-master\OapiRobotTest\bin\Debug\OapiRobotTest.vshost.exe.manifest
?????目錄???????????0??2019-01-02?11:56??DDRobot-master\OapiRobotTest\obj\
?????目錄???????????0??2019-01-02?11:56??DDRobot-master\OapiRobotTest\obj\Debug\
............此處省略53個文件信息

評論

共有 條評論