1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039 |
- #region Apache License Version 2.0
- #endregion Apache License Version 2.0
- using System.Threading.Tasks;
- using Senparc.CO2NET;
- using Senparc.NeuChar;
- using Senparc.Weixin.CommonAPIs;
- using Senparc.Weixin.MP.AdvancedAPIs.Analysis;
- using Senparc.Weixin.MP.CommonAPIs;
- namespace Senparc.Weixin.MP.AdvancedAPIs
- {
-
-
-
-
-
- public static class AnalysisApi
- {
- #region 同步方法
- #region 图文分析数据接口
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetArticleSummary", true)]
- public static AnalysisResultJson<ArticleSummaryItem> GetArticleSummary(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getarticlesummary?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<ArticleSummaryItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetArticleTotal", true)]
- public static AnalysisResultJson<ArticleTotalItem> GetArticleTotal(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getarticletotal?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<ArticleTotalItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserRead", true)]
- public static AnalysisResultJson<UserReadItem> GetUserRead(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getuserread?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UserReadItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserReadHour", true)]
- public static AnalysisResultJson<UserReadHourItem> GetUserReadHour(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getuserreadhour?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UserReadHourItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserShare", true)]
- public static AnalysisResultJson<UserShareItem> GetUserShare(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getusershare?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UserShareItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserShareHour", true)]
- public static AnalysisResultJson<UserShareHourItem> GetUserShareHour(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getusersharehour?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UserShareHourItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
- #endregion
- #region 接口分析数据接口
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetInterfaceSummary", true)]
- public static AnalysisResultJson<InterfaceSummaryItem> GetInterfaceSummary(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getinterfacesummary?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<InterfaceSummaryItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetInterfaceSummaryHour", true)]
- public static AnalysisResultJson<InterfaceSummaryHourItem> GetInterfaceSummaryHour(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getinterfacesummaryhour?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<InterfaceSummaryHourItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
- #endregion
- #region 消息分析数据接口
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsg", true)]
- public static AnalysisResultJson<UpStreamMsgItem> GetUpStreamMsg(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsg?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UpStreamMsgItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgHour", true)]
- public static AnalysisResultJson<UpStreamMsgHourItem> GetUpStreamMsgHour(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsghour?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UpStreamMsgHourItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgWeek", true)]
- public static AnalysisResultJson<UpStreamMsgWeekItem> GetUpStreamMsgWeek(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsgweek?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UpStreamMsgWeekItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgMonth", true)]
- public static AnalysisResultJson<UpStreamMsgMonthItem> GetUpStreamMsgMonth(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsgmonth?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UpStreamMsgMonthItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgDist", true)]
- public static AnalysisResultJson<UpStreamMsgDistItem> GetUpStreamMsgDist(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsgdist?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UpStreamMsgDistItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgDistWeek", true)]
- public static AnalysisResultJson<UpStreamMsgDistWeekItem> GetUpStreamMsgDistWeek(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsgdistweek?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UpStreamMsgDistWeekItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgDistMonth", true)]
- public static AnalysisResultJson<UpStreamMsgDistMonthItem> GetUpStreamMsgDistMonth(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsgdistmonth?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UpStreamMsgDistMonthItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
- #endregion
- #region 用户分析数据接口
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserSummary", true)]
- public static AnalysisResultJson<UserSummaryItem> GetUserSummary(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getusersummary?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UserSummaryItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserCumulate", true)]
- public static AnalysisResultJson<UserCumulateItem> GetUserCumulate(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return ApiHandlerWapper.TryCommonApi(accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getusercumulate?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return CommonJsonSend.Send<AnalysisResultJson<UserCumulateItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
- #endregion
- #endregion
- #if !NET35 && !NET40
- #region 异步方法
- #region 图文分析数据接口
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetArticleSummaryAsync", true)]
- public static async Task<AnalysisResultJson<ArticleSummaryItem>> GetArticleSummaryAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getarticlesummary?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await
- Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<ArticleSummaryItem>>(
- accessToken, urlFormat, data,
- timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetArticleTotalAsync", true)]
- public static async Task<AnalysisResultJson<ArticleTotalItem>> GetArticleTotalAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getarticletotal?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<ArticleTotalItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserReadAsync", true)]
- public static async Task<AnalysisResultJson<UserReadItem>> GetUserReadAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getuserread?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UserReadItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserReadHourAsync", true)]
- public static async Task<AnalysisResultJson<UserReadHourItem>> GetUserReadHourAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getuserreadhour?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UserReadHourItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserShareAsync", true)]
- public static async Task<AnalysisResultJson<UserShareItem>> GetUserShareAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getusershare?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UserShareItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserShareHourAsync", true)]
- public static async Task<AnalysisResultJson<UserShareHourItem>> GetUserShareHourAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getusersharehour?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UserShareHourItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
- #endregion
- #region 接口分析数据接口
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetInterfaceSummaryAsync", true)]
- public static async Task<AnalysisResultJson<InterfaceSummaryItem>> GetInterfaceSummaryAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getinterfacesummary?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<InterfaceSummaryItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetInterfaceSummaryHourAsync", true)]
- public static async Task<AnalysisResultJson<InterfaceSummaryHourItem>> GetInterfaceSummaryHourAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getinterfacesummaryhour?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<InterfaceSummaryHourItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
- #endregion
- #region 消息分析数据接口
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgAsync", true)]
- public static async Task<AnalysisResultJson<UpStreamMsgItem>> GetUpStreamMsgAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsg?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UpStreamMsgItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgHourAsync", true)]
- public static async Task<AnalysisResultJson<UpStreamMsgHourItem>> GetUpStreamMsgHourAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsghour?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UpStreamMsgHourItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgWeekAsync", true)]
- public static async Task<AnalysisResultJson<UpStreamMsgWeekItem>> GetUpStreamMsgWeekAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsgweek?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UpStreamMsgWeekItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgMonthAsync", true)]
- public static async Task<AnalysisResultJson<UpStreamMsgMonthItem>> GetUpStreamMsgMonthAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsgmonth?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UpStreamMsgMonthItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgDistAsync", true)]
- public static async Task<AnalysisResultJson<UpStreamMsgDistItem>> GetUpStreamMsgDistAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsgdist?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UpStreamMsgDistItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgDistWeekAsync", true)]
- public static async Task<AnalysisResultJson<UpStreamMsgDistWeekItem>> GetUpStreamMsgDistWeekAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsgdistweek?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UpStreamMsgDistWeekItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUpStreamMsgDistMonthAsync", true)]
- public static async Task<AnalysisResultJson<UpStreamMsgDistMonthItem>> GetUpStreamMsgDistMonthAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getupstreammsgdistmonth?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UpStreamMsgDistMonthItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
- #endregion
- #region 用户分析数据接口
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserSummaryAsync", true)]
- public static async Task<AnalysisResultJson<UserSummaryItem>> GetUserSummaryAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getusersummary?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UserSummaryItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
-
-
-
-
-
-
-
-
-
- [ApiBind(NeuChar.PlatformType.WeChat_OfficialAccount, "AnalysisApi.GetUserCumulateAsync", true)]
- public static async Task<AnalysisResultJson<UserCumulateItem>> GetUserCumulateAsync(string accessTokenOrAppId, string beginDate, string endDate, int timeOut = Config.TIME_OUT)
- {
- return await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
- {
- string urlFormat = Config.ApiMpHost + "/datacube/getusercumulate?access_token={0}";
- var data = new
- {
- begin_date = beginDate,
- end_date = endDate
- };
- return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync<AnalysisResultJson<UserCumulateItem>>(accessToken, urlFormat, data, timeOut: timeOut);
- }, accessTokenOrAppId);
- }
- #endregion
- #endregion
- #endif
- }
- }
|