├── .editorconfig
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── code-generators
├── oceanengine-code-generator
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── hyq0719
│ │ │ └── mktapi
│ │ │ └── generator
│ │ │ └── oceanengine
│ │ │ ├── OceanEngineGenerator.java
│ │ │ ├── bean
│ │ │ └── ExampleStruct.java
│ │ │ ├── entity
│ │ │ ├── BaseClassInfo.java
│ │ │ ├── BaseEntity.java
│ │ │ ├── CrawlerResult.java
│ │ │ ├── GeneratorConfigEntity.java
│ │ │ └── SingleFileEntity.java
│ │ │ ├── handler
│ │ │ ├── CodeGenerator.java
│ │ │ ├── CrawlerHandler.java
│ │ │ └── EntityTableHandler.java
│ │ │ └── util
│ │ │ └── GeneratorUtils.java
│ │ └── resources
│ │ ├── generator.yml
│ │ └── template
│ │ └── default.java.vm
├── pom.xml
├── tencent-code-generator
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── hyq0719
│ │ │ └── mktapi
│ │ │ └── generator
│ │ │ └── tencent
│ │ │ ├── TencentGenerator.java
│ │ │ ├── bean
│ │ │ └── ExampleStruct.java
│ │ │ ├── entity
│ │ │ ├── BaseClassInfo.java
│ │ │ ├── BaseEntity.java
│ │ │ ├── CrawlerResult.java
│ │ │ ├── GeneratorConfigEntity.java
│ │ │ └── SingleFileEntity.java
│ │ │ ├── handler
│ │ │ ├── CodeGenerator.java
│ │ │ ├── CrawlerHandler.java
│ │ │ └── EntityTableHandler.java
│ │ │ └── util
│ │ │ └── GeneratorUtils.java
│ │ └── resources
│ │ ├── generator.yml
│ │ └── template
│ │ └── default.java.vm
└── vivo-code-generator
│ ├── pom.xml
│ └── src
│ └── main
│ ├── java
│ └── com
│ │ └── hyq0719
│ │ └── mktapi
│ │ └── generator
│ │ └── vivo
│ │ ├── VivoGenerator.java
│ │ ├── bean
│ │ └── ExampleStruct.java
│ │ ├── entity
│ │ ├── BaseClassInfo.java
│ │ ├── BaseEntity.java
│ │ ├── CrawlerResult.java
│ │ ├── GeneratorConfigEntity.java
│ │ └── SingleFileEntity.java
│ │ ├── handler
│ │ ├── CodeGenerator.java
│ │ ├── CrawlerHandler.java
│ │ └── EntityTableHandler.java
│ │ └── util
│ │ └── GeneratorUtils.java
│ └── resources
│ ├── generator.yml
│ └── template
│ └── default.java.vm
├── marketing-api-common
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── hyq0719
│ └── mktapi
│ └── common
│ ├── ApiClient.java
│ ├── ApiRequest.java
│ ├── ApiResponse.java
│ ├── RetryStrategy.java
│ ├── advice
│ └── ApiRequestAdvice.java
│ ├── annotation
│ └── ApiRequestMapping.java
│ ├── constant
│ ├── AuthConstants.java
│ └── RequestConstants.java
│ ├── exception
│ └── ApiException.java
│ ├── executor
│ ├── http
│ │ ├── ApacheHttpHandler.java
│ │ ├── BaseHttpHandler.java
│ │ ├── HttpHandler.java
│ │ └── OkhttpHttpHandler.java
│ └── parameter
│ │ ├── BaseUrl.java
│ │ ├── Pair.java
│ │ ├── ParamHandler.java
│ │ └── RequestParam.java
│ ├── token
│ ├── CronService.java
│ ├── ExternalTokenService.java
│ ├── IToken.java
│ ├── ITokenCronService.java
│ └── cache
│ │ ├── ITokenLocalCache.java
│ │ └── LocalCache.java
│ └── util
│ ├── DataPageFetcher.java
│ ├── DigestUtil.java
│ ├── JSON.java
│ ├── JsonUtil.java
│ ├── PairUtil.java
│ └── StringUtil.java
├── marketing-api-kuaishou
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── hyq0719
│ └── mktapi
│ └── kuaishou
│ ├── KshApiClient.java
│ ├── KshApiRequest.java
│ ├── KshRetryStrategy.java
│ ├── api
│ ├── AbstractKshApi.java
│ ├── AccountServiceApi.java
│ ├── AdServingApi.java
│ └── DataReportApi.java
│ ├── bean
│ ├── CodeKey.java
│ ├── IPage.java
│ ├── TokenKey.java
│ ├── ad_unit
│ │ ├── AdUnitCreateRequest.java
│ │ ├── AdUnitCreateResponseStruct.java
│ │ ├── AdUnitListRequest.java
│ │ ├── AdUnitListResponseStruct.java
│ │ ├── AdUnitUpdateBidRequest.java
│ │ ├── AdUnitUpdateDayBudgetRequest.java
│ │ ├── AdUnitUpdateRequest.java
│ │ ├── AdUnitUpdateResponseStruct.java
│ │ ├── AdUnitUpdateStatusRequest.java
│ │ ├── AdUnitUpdateStatusResponseStruct.java
│ │ ├── AdvCardListStruct.java
│ │ ├── AgeStruct.java
│ │ ├── BackflowForecastStruct.java
│ │ ├── DiverseDataStruct.java
│ │ ├── GiftDataStruct.java
│ │ ├── IntelliExtendStruct.java
│ │ ├── ScheduleStruct.java
│ │ └── TargetStruct.java
│ ├── advertiser
│ │ ├── AdvertiserBudgetGetRequest.java
│ │ ├── AdvertiserBudgetGetResponseStruct.java
│ │ ├── AdvertiserFundGetRequest.java
│ │ ├── AdvertiserFundGetResponseStruct.java
│ │ ├── AdvertiserInfoRequest.java
│ │ ├── AdvertiserInfoResponseStruct.java
│ │ └── AdvertiserUpdateBudgetRequest.java
│ ├── campaign
│ │ ├── CampaignCreateRequest.java
│ │ ├── CampaignCreateResponseStruct.java
│ │ ├── CampaignListRequest.java
│ │ ├── CampaignListResponseStruct.java
│ │ ├── CampaignUpdateRequest.java
│ │ ├── CampaignUpdateResponseStruct.java
│ │ ├── CampaignUpdateStatusRequest.java
│ │ └── CampaignUpdateStatusResponseStruct.java
│ ├── common
│ │ ├── KshResponse.java
│ │ └── PageResponseData.java
│ ├── creative
│ │ ├── AdcreativesAdvancedProgramAddRequest.java
│ │ ├── AdcreativesAdvancedProgramAddResponseStruct.java
│ │ ├── CombineDetailsViewStruct.java
│ │ ├── CreativeAdvancedProgramListRequest.java
│ │ ├── CreativeAdvancedProgramListResponseStruct.java
│ │ ├── CreativeAdvancedProgramReviewDetailRequest.java
│ │ ├── CreativeAdvancedProgramReviewDetailResponseStruct.java
│ │ ├── CreativeBatchUpdateRequest.java
│ │ ├── CreativeBatchUpdateResponseStruct.java
│ │ ├── CreativeCreateCreativeTagAdviseRequest.java
│ │ ├── CreativeCreateCreativeTagAdviseResponseStruct.java
│ │ ├── CreativeCreatePreviewRequest.java
│ │ ├── CreativeCreateRequest.java
│ │ ├── CreativeCreateResponseStruct.java
│ │ ├── CreativeListRequest.java
│ │ ├── CreativeListResponseStruct.java
│ │ ├── CreativeUpdateRequest.java
│ │ ├── CreativeUpdateResponseStruct.java
│ │ ├── CreativeUpdateStatusRequest.java
│ │ ├── CreativeUpdateStatusResponseStruct.java
│ │ ├── CreativesStruct.java
│ │ ├── DisplayInfoStruct.java
│ │ ├── MaterialsStruct.java
│ │ ├── PhotoListStruct.java
│ │ └── ProgrammedCreativeMaterialStruct.java
│ ├── report
│ │ ├── AgentReportRequest.java
│ │ ├── AgentReportResponseStruct.java
│ │ ├── ReportAccountReportRequest.java
│ │ ├── ReportAccountReportResponseStruct.java
│ │ ├── ReportCampaignReportRequest.java
│ │ ├── ReportCampaignReportResponseStruct.java
│ │ ├── ReportCreativeReportRequest.java
│ │ ├── ReportCreativeReportResponseStruct.java
│ │ ├── ReportUnitReportRequest.java
│ │ └── ReportUnitReportResponseStruct.java
│ └── tool
│ │ ├── ContentLogStruct.java
│ │ ├── ToolAudiencePredictionRequest.java
│ │ ├── ToolAudiencePredictionResponseStruct.java
│ │ ├── ToolOperationRecordListRequest.java
│ │ └── ToolOperationRecordListResponseStruct.java
│ ├── service
│ └── KshSdkService.java
│ ├── token
│ └── KshExternalTokenService.java
│ └── util
│ └── KshDataPageFetcher.java
├── marketing-api-oceanengine
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── hyq0719
│ └── mktapi
│ └── oceanengine
│ ├── OceanApiClient.java
│ ├── OceanApiRequest.java
│ ├── OceanDefaultFields.java
│ ├── OceanRetryStrategy.java
│ ├── api
│ ├── AbstractOceanApi.java
│ ├── AccountServiceApi.java
│ ├── AdServingApi.java
│ ├── DataReportApi.java
│ ├── DmpAudienceApi.java
│ ├── MaterialApi.java
│ └── TokenApi.java
│ ├── bean
│ ├── CodeKey.java
│ ├── IPage.java
│ ├── TokenKey.java
│ ├── ad
│ │ ├── ActionStruct.java
│ │ ├── AdCostProtectStatusGetRequest.java
│ │ ├── AdCostProtectStatusGetResponseData.java
│ │ ├── AdCreateRequest.java
│ │ ├── AdCreateResponseData.java
│ │ ├── AdGetFilteringStruct.java
│ │ ├── AdGetResponseListStruct.java
│ │ ├── AdRejectReasonRequest.java
│ │ ├── AdRejectReasonResponseData.java
│ │ ├── AdRejectReasonResponseListStruct.java
│ │ ├── AdRejectStruct.java
│ │ ├── AdUpdateBidRequest.java
│ │ ├── AdUpdateBidRequestData.java
│ │ ├── AdUpdateBidResponseData.java
│ │ ├── AdUpdateBudgetRequest.java
│ │ ├── AdUpdateBudgetRequestData.java
│ │ ├── AdUpdateBudgetResponseData.java
│ │ ├── AdUpdateRequest.java
│ │ ├── AdUpdateResponseData.java
│ │ ├── AdUpdateStatusRequest.java
│ │ ├── AdUpdateStatusResponseData.java
│ │ ├── AdsGetCostProtectStatusResponseListStruct.java
│ │ ├── AudienceStruct.java
│ │ ├── CreativeRejectStruct.java
│ │ ├── DpaProductTargetStruct.java
│ │ ├── ErrorStruct.java
│ │ ├── ExcludeCustomActionsStruct.java
│ │ ├── GeolocationStruct.java
│ │ ├── IncludeCustomActionsStruct.java
│ │ ├── MaterialRejectStruct.java
│ │ └── RejectDataStruct.java
│ ├── advertiser
│ │ ├── AdvertiserFundDailyStatReponseStruct.java
│ │ ├── AdvertiserFundDailyStatRequest.java
│ │ ├── AdvertiserFundGetStruct.java
│ │ └── MajordomoAdvertiserSelectStruct.java
│ ├── campaign
│ │ ├── CampaignCreateRequest.java
│ │ ├── CampaignCreateResponseData.java
│ │ ├── CampaignGetFilteringStruct.java
│ │ ├── CampaignGetListStruct.java
│ │ ├── CampaignUpdateRequest.java
│ │ ├── CampaignUpdateResponseData.java
│ │ ├── CampaignUpdateStatusError.java
│ │ ├── CampaignUpdateStatusRequest.java
│ │ └── CampaignUpdateStatusResponseData.java
│ ├── common
│ │ ├── OceanRequest.java
│ │ ├── OceanResponse.java
│ │ ├── PageInfo.java
│ │ └── PageResponseData.java
│ ├── creative
│ │ ├── AbstractMaterialsStruct.java
│ │ ├── AdDataStruct.java
│ │ ├── BidWordListStruct.java
│ │ ├── ComponentMaterialsStruct.java
│ │ ├── CreativeCustomCreativeCreateRequest.java
│ │ ├── CreativeCustomCreativeCreateResponseData.java
│ │ ├── CreativeCustomCreativeUpdateRequest.java
│ │ ├── CreativeCustomCreativeUpdateResponseData.java
│ │ ├── CreativeGetFilteringStruct.java
│ │ ├── CreativeGetListStruct.java
│ │ ├── CreativeListStruct.java
│ │ ├── DpaWordListStruct.java
│ │ ├── ErrorStruct.java
│ │ ├── ImageInfoStruct.java
│ │ ├── ImageMaterialsStruct.java
│ │ ├── MaterialsStruct.java
│ │ ├── PlayableInfoStruct.java
│ │ ├── PlayableMaterialStruct.java
│ │ ├── StructAbstractInfoStruct.java
│ │ ├── SubTitleMaterialStruct.java
│ │ ├── TemplateDataListStruct.java
│ │ ├── TemplateImageStruct.java
│ │ ├── TextAbstractInfoStruct.java
│ │ ├── TitleMaterialStruct.java
│ │ ├── VideoInfoStruct.java
│ │ ├── VideoMaterialStruct.java
│ │ └── WordListStruct.java
│ ├── dmp
│ │ ├── ChangeLogsStruct.java
│ │ ├── CustomAudienceListStruct.java
│ │ ├── DefaultAudienceStruct.java
│ │ ├── DmpCustomAudienceDeleteRequest.java
│ │ ├── DmpCustomAudienceDeleteResponseData.java
│ │ ├── DmpCustomAudiencePublishRequest.java
│ │ ├── DmpCustomAudiencePushV2Request.java
│ │ ├── DmpCustomAudienceReadRequest.java
│ │ ├── DmpCustomAudienceReadResponseData.java
│ │ ├── DmpCustomAudienceSelectRequest.java
│ │ ├── DmpCustomAudienceSelectResponseData.java
│ │ ├── DmpDataSourceCreateRequest.java
│ │ ├── DmpDataSourceCreateResponseData.java
│ │ ├── DmpDataSourceFileUploadRequest.java
│ │ ├── DmpDataSourceFileUploadResponseData.java
│ │ ├── DmpDataSourceReadDataListStruct.java
│ │ ├── DmpDataSourceReadRequest.java
│ │ ├── DmpDataSourceReadResponseData.java
│ │ └── DmpDataSourceUpdateRequest.java
│ ├── material
│ │ ├── FailListStruct.java
│ │ ├── FileImageAdGetRequest.java
│ │ ├── FileImageAdRequest.java
│ │ ├── FileImageAdResponseData.java
│ │ ├── FileImageAdvertiserRequest.java
│ │ ├── FileImageAdvertiserResponseData.java
│ │ ├── FileImageGetFilteringStruct.java
│ │ ├── FileImageGetListStruct.java
│ │ ├── FileImageGetRequest.java
│ │ ├── FileMaterialBindRequest.java
│ │ ├── FileMaterialBindResponseData.java
│ │ ├── FileVideoAdGetRequest.java
│ │ ├── FileVideoAdRequest.java
│ │ ├── FileVideoAdResponseData.java
│ │ ├── FileVideoDeleteRequest.java
│ │ ├── FileVideoDeleteResponseData.java
│ │ ├── FileVideoGetFilteringStruct.java
│ │ ├── FileVideoGetListStruct.java
│ │ ├── FileVideoUpdateRequest.java
│ │ ├── FileVideoUpdateResponseData.java
│ │ ├── ToolsVideoCoverSuggestListStruct.java
│ │ ├── ToolsVideoCoverSuggestRequest.java
│ │ ├── ToolsVideoCoverSuggestResponseData.java
│ │ └── VideosStruct.java
│ ├── report
│ │ ├── ReportAdGetFilteringStruct.java
│ │ ├── ReportAdGetListStruct.java
│ │ ├── ReportAdvertiserGetFilteringStruct.java
│ │ ├── ReportAdvertiserGetListStruct.java
│ │ ├── ReportAgentGetV2FilteringStruct.java
│ │ ├── ReportAgentGetV2ListStruct.java
│ │ ├── ReportAgentGetV2Request.java
│ │ ├── ReportCampaignGetFilteringStruct.java
│ │ ├── ReportCampaignGetListStruct.java
│ │ ├── ReportCreativeGetFilteringStruct.java
│ │ ├── ReportCreativeGetListStruct.java
│ │ └── ReportRequest.java
│ └── token
│ │ ├── AccessTokenRequest.java
│ │ ├── AccessTokenResponseData.java
│ │ ├── AdvertiserGetListStruct.java
│ │ ├── AdvertiserGetRequest.java
│ │ ├── AdvertiserGetResponseData.java
│ │ ├── AppAccessTokenRequest.java
│ │ ├── AppAccessTokenResponseData.java
│ │ ├── RefreshTokenRequest.java
│ │ ├── RefreshTokenResponseData.java
│ │ ├── UserInfoRequest.java
│ │ └── UserInfoResponseData.java
│ ├── service
│ └── OceanSdkService.java
│ ├── token
│ └── OceanExternalTokenService.java
│ └── util
│ └── OceanDataPageFetcher.java
├── marketing-api-tencent
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── hyq0719
│ └── mktapi
│ └── tencent
│ ├── TencentApiClient.java
│ ├── TencentApiRequest.java
│ ├── TencentDefaultFields.java
│ ├── TencentRetryStrategy.java
│ ├── api
│ ├── AbstractTencentApi.java
│ ├── AccountManagementApi.java
│ ├── AdManagementApi.java
│ ├── DataReportApi.java
│ └── OauthApi.java
│ ├── bean
│ ├── CodeKey.java
│ ├── IPage.java
│ ├── TokenKey.java
│ ├── account
│ │ ├── adAccount
│ │ │ ├── BusinessManagerRelationsGetListStruct.java
│ │ │ └── BusinessManagerRelationsGetRequest.java
│ │ └── funds
│ │ │ ├── FundsGetListStruct.java
│ │ │ ├── Memo.java
│ │ │ ├── WechatFundSpec.java
│ │ │ ├── WechatFundsGetListStruct.java
│ │ │ └── WechatFundsGetResponseData.java
│ ├── adcreatives
│ │ ├── AdcreativesAddRequest.java
│ │ ├── AdcreativesAddResponseData.java
│ │ ├── AdcreativesDeleteRequest.java
│ │ ├── AdcreativesDeleteResponseData.java
│ │ ├── AdcreativesGetListStruct.java
│ │ ├── AdcreativesUpdateRequest.java
│ │ └── AdcreativesUpdateResponseData.java
│ ├── adgroups
│ │ ├── AdgroupsAddRequest.java
│ │ ├── AdgroupsAddResponseData.java
│ │ ├── AdgroupsDeleteRequest.java
│ │ ├── AdgroupsDeleteResponseData.java
│ │ ├── AdgroupsGetListStruct.java
│ │ ├── AdgroupsUpdateBidAmountListStruct.java
│ │ ├── AdgroupsUpdateBidAmountRequest.java
│ │ ├── AdgroupsUpdateBidAmountResponseData.java
│ │ ├── AdgroupsUpdateConfiguredStatusListStruct.java
│ │ ├── AdgroupsUpdateConfiguredStatusRequest.java
│ │ ├── AdgroupsUpdateConfiguredStatusResponseData.java
│ │ ├── AdgroupsUpdateConfiguredStatusUpdateConfiguredStatusStruct.java
│ │ ├── AdgroupsUpdateDailyBudgetListStruct.java
│ │ ├── AdgroupsUpdateDailyBudgetRequest.java
│ │ ├── AdgroupsUpdateDailyBudgetResponseData.java
│ │ ├── AdgroupsUpdateDailyBudgetUpdateDailyBudgetStruct.java
│ │ ├── AdgroupsUpdateDatetimeListStruct.java
│ │ ├── AdgroupsUpdateDatetimeRequest.java
│ │ ├── AdgroupsUpdateDatetimeResponseData.java
│ │ ├── AdgroupsUpdateRequest.java
│ │ ├── AdgroupsUpdateResponseData.java
│ │ ├── UpdateBidAmountStruct.java
│ │ └── UpdateDatetimeStruct.java
│ ├── ads
│ │ ├── AdsAddRequest.java
│ │ ├── AdsAddResponseData.java
│ │ ├── AdsDeleteRequest.java
│ │ ├── AdsDeleteResponseData.java
│ │ ├── AdsGetListStruct.java
│ │ ├── AdsUpdateConfiguredStatusListStruct.java
│ │ ├── AdsUpdateConfiguredStatusRequest.java
│ │ ├── AdsUpdateConfiguredStatusResponseData.java
│ │ ├── AdsUpdateConfiguredStatusUpdateConfiguredStatusStruct.java
│ │ ├── AdsUpdateRequest.java
│ │ └── AdsUpdateResponseData.java
│ ├── advertiser
│ │ ├── AdvertiserUpdateDailyBudgetListStruct.java
│ │ ├── AdvertiserUpdateDailyBudgetRequest.java
│ │ ├── AdvertiserUpdateDailyBudgetResponseData.java
│ │ └── AdvertiserUpdateDailyBudgetUpdateDailyBudgetStruct.java
│ ├── batch
│ │ ├── BatchCopyCampaignResult.java
│ │ ├── BatchCopyDetailedInformation.java
│ │ ├── BatchCopyDetailedInformationStruct.java
│ │ ├── ComposeBatchCopyRequest.java
│ │ └── ComposeBatchCopyResponse.java
│ ├── campaigns
│ │ ├── CampaignsAddRequest.java
│ │ ├── CampaignsAddResponseData.java
│ │ ├── CampaignsDeleteRequest.java
│ │ ├── CampaignsDeleteResponseData.java
│ │ ├── CampaignsGetListStruct.java
│ │ ├── CampaignsGetResponseData.java
│ │ ├── CampaignsUpdateConfiguredStatusListStruct.java
│ │ ├── CampaignsUpdateConfiguredStatusRequest.java
│ │ ├── CampaignsUpdateConfiguredStatusResponseData.java
│ │ ├── CampaignsUpdateConfiguredStatusUpdateConfiguredStatusStruct.java
│ │ ├── CampaignsUpdateDailyBudgetListStruct.java
│ │ ├── CampaignsUpdateDailyBudgetRequest.java
│ │ ├── CampaignsUpdateDailyBudgetResponseData.java
│ │ ├── CampaignsUpdateDailyBudgetUpdateDailyBudgetStruct.java
│ │ ├── CampaignsUpdateRequest.java
│ │ └── CampaignsUpdateResponseData.java
│ ├── common
│ │ ├── AdCreativeBrand.java
│ │ ├── AdCreativeEndPage.java
│ │ ├── Adcreative.java
│ │ ├── AdcreativeBannerContent.java
│ │ ├── AdcreativeCardContent.java
│ │ ├── AdcreativeCorporate.java
│ │ ├── AdcreativeCreativeElementsMp.java
│ │ ├── AdcreativeCreativeElementsRead.java
│ │ ├── AdcreativeCreativeElementsReadMp.java
│ │ ├── AdcreativeElementStoryArrayItem.java
│ │ ├── AdcreativeLabel.java
│ │ ├── AdcreativeLabelledImg.java
│ │ ├── AdcreativeLogoPage.java
│ │ ├── AdcreativeMiniProgramSpec.java
│ │ ├── AdcreativeVideoPopupButton.java
│ │ ├── AgeStruct.java
│ │ ├── ApiErrorStruct.java
│ │ ├── AppBehavior.java
│ │ ├── AuditSpecStruct.java
│ │ ├── BatchResponseData.java
│ │ ├── BehaviorOrInterest.java
│ │ ├── BehaviorStruct.java
│ │ ├── BidAdjustment.java
│ │ ├── CommonParamExceptionSpec.java
│ │ ├── ConfPageSize500.java
│ │ ├── CreativeLabel.java
│ │ ├── CreditRollSpec.java
│ │ ├── CustomLocationsItem.java
│ │ ├── DeepConversionBehaviorSpec.java
│ │ ├── DeepConversionSpec.java
│ │ ├── DeepConversionWorthSpec.java
│ │ ├── DeviceBrandModel.java
│ │ ├── DynamicAdSpec.java
│ │ ├── DynamicAdcreativeSpec.java
│ │ ├── ExcludedConvertedAudienceStruct.java
│ │ ├── FilteringStruct.java
│ │ ├── FloatingZone.java
│ │ ├── GeoLocations.java
│ │ ├── Intention.java
│ │ ├── Interest.java
│ │ ├── Keyword.java
│ │ ├── LinkPageSpec.java
│ │ ├── ListResponse.java
│ │ ├── LongVideoStruct.java
│ │ ├── MiniGameSpec.java
│ │ ├── MiniprogramAmount.java
│ │ ├── PageResponseData.java
│ │ ├── PageSpec.java
│ │ ├── ReadTargetingSettingForAdgroup.java
│ │ ├── RequestListData.java
│ │ ├── ResidentialCommunityPriceStruct.java
│ │ ├── ResponseListData.java
│ │ ├── RevisedAdcreativeElements.java
│ │ ├── RevisedAdcreativeSpec.java
│ │ ├── RevisedPageSpec.java
│ │ ├── SceneTargeting.java
│ │ ├── SceneTargetingForWrite.java
│ │ ├── ShareContentSpec.java
│ │ ├── ShortVideoStruct.java
│ │ ├── SiteSetPackageStruct.java
│ │ ├── TemperatureStruct.java
│ │ ├── TencentRequest.java
│ │ ├── TencentResponse.java
│ │ ├── UserActionSetStruct.java
│ │ ├── VideoEndPageSpec.java
│ │ ├── WechatAdBehavior.java
│ │ └── WriteTargetingSettingForAdgroup.java
│ ├── oauth
│ │ ├── AuthorizerInfoStruct.java
│ │ ├── OauthAuthorizeRequest.java
│ │ ├── OauthTokenRequest.java
│ │ └── OauthTokenResponseData.java
│ └── targetings
│ │ ├── AdLockStatus.java
│ │ ├── ReadTargetingSetting.java
│ │ ├── TargetingPkgSourceType.java
│ │ └── TargetingsGetListStruct.java
│ ├── service
│ └── TencentSdkService.java
│ ├── token
│ └── TencentExternalTokenService.java
│ └── util
│ └── TencentDataPageFetcher.java
├── marketing-api-vivo
├── pom.xml
└── src
│ └── main
│ └── java
│ └── com
│ └── hyq0719
│ └── mktapi
│ └── vivo
│ ├── VivoApiClient.java
│ ├── VivoApiRequest.java
│ ├── VivoRetryStrategy.java
│ ├── api
│ ├── AbstractVivoApi.java
│ ├── AccountServiceApi.java
│ ├── DataAccessApi.java
│ ├── DataQueryApi.java
│ ├── DmpTagApi.java
│ ├── PromotionServiceApi.java
│ └── TokenApi.java
│ ├── bean
│ ├── CodeKey.java
│ ├── IPage.java
│ ├── TokenKey.java
│ ├── acoountService
│ │ ├── AccountAdvertiserQueryListStruct.java
│ │ ├── AccountAdvertiserQueryRequest.java
│ │ ├── AccountAdvertiserQueryResponseData.java
│ │ ├── AccountBalanceQueryRequest.java
│ │ ├── AccountBalanceQueryResponseData.java
│ │ ├── AccountFetchAccountRequest.java
│ │ ├── AccountFetchAccountResponseData.java
│ │ ├── AccountFetchRequest.java
│ │ ├── AccountFetchResponseData.java
│ │ ├── FinanceFundsQueryFoundsListStruct.java
│ │ ├── FinanceFundsQueryFoundsRequest.java
│ │ ├── FinanceFundsQueryFoundsResponseData.java
│ │ ├── FinanceTransferQueryTransfersListStruct.java
│ │ ├── FinanceTransferQueryTransfersRequest.java
│ │ ├── FinanceTransferQueryTransfersResponseData.java
│ │ ├── FinanceUpdateDailyBudgetRequest.java
│ │ └── PageInfoStruct.java
│ ├── common
│ │ └── VivoResponse.java
│ ├── dataAccess
│ │ ├── AdvertiserBehaviorUploadRequest.java
│ │ └── DataListStruct.java
│ ├── dataQuery
│ │ ├── AdstatementDownloadImeiQueryListStruct.java
│ │ ├── AdstatementDownloadImeiQueryRequest.java
│ │ ├── AdstatementDownloadImeiQueryResponseData.java
│ │ ├── AdstatementGameQueryItemsStruct.java
│ │ ├── AdstatementGameQueryRequest.java
│ │ ├── AdstatementGameQueryResponseData.java
│ │ ├── AdstatementPromptQueryItemsStruct.java
│ │ ├── AdstatementPromptQueryRequest.java
│ │ ├── AdstatementPromptQueryResponseData.java
│ │ ├── AdstatementQuickGameQueryItemsStruct.java
│ │ ├── AdstatementQuickGameQueryRequest.java
│ │ ├── AdstatementQuickGameQueryResponseData.java
│ │ ├── AdstatementSummaryQueryItemsStruct.java
│ │ ├── AdstatementSummaryQueryRequest.java
│ │ ├── AdstatementSummaryQueryResponseData.java
│ │ ├── ChannelInfoQueryRequest.java
│ │ ├── ChannelInfoQueryResponseData.java
│ │ ├── DeepLinkQueryRequest.java
│ │ ├── DeepLinkQueryResponseData.java
│ │ ├── FilterFieldIdsStruct.java
│ │ └── PageInfoStruct.java
│ ├── dmpTag
│ │ ├── AdDmpTagCreateRequest.java
│ │ ├── AdDmpTagCreateResponseData.java
│ │ ├── AdDmpTagModifyRequest.java
│ │ ├── AdDmpTagModifyResponseData.java
│ │ ├── AdDmpTagQueryRequest.java
│ │ ├── AdDmpTagQueryResponseData.java
│ │ └── AdDmpTagUploadRequest.java
│ ├── promotionService
│ │ ├── AdAdvertisementAddCustomizeAdCreativeRequest.java
│ │ ├── AdAdvertisementAddCustomizeAdCreativeResponseData.java
│ │ ├── AdAdvertisementAddRequest.java
│ │ ├── AdAdvertisementAddResponseData.java
│ │ ├── AdAdvertisementBatchDelRequest.java
│ │ ├── AdAdvertisementDelRequest.java
│ │ ├── AdAdvertisementEditByIdRequest.java
│ │ ├── AdAdvertisementEditCustomizeAdCreativeRequest.java
│ │ ├── AdAdvertisementEditCustomizeAdCreativeResponseData.java
│ │ ├── AdAdvertisementEditNameRequest.java
│ │ ├── AdAdvertisementPageInfoByLastIdListDataStruct.java
│ │ ├── AdAdvertisementPageInfoByLastIdRequest.java
│ │ ├── AdAdvertisementPageInfoByLastIdResponseData.java
│ │ ├── AdAdvertisementPageInfoListStruct.java
│ │ ├── AdAdvertisementPageInfoRequest.java
│ │ ├── AdAdvertisementPageInfoResponseData.java
│ │ ├── AdAdvertisementPauseToggleRequest.java
│ │ ├── AdCampaignAddRequest.java
│ │ ├── AdCampaignAddResponseData.java
│ │ ├── AdCampaignBatchDelRequest.java
│ │ ├── AdCampaignDelRequest.java
│ │ ├── AdCampaignEditByIdRequest.java
│ │ ├── AdCampaignEditByIdResponseData.java
│ │ ├── AdCampaignEditDailyBudgetRequest.java
│ │ ├── AdCampaignEditDailyBudgetResponseData.java
│ │ ├── AdCampaignEditNameRequest.java
│ │ ├── AdCampaignEditNameResponseData.java
│ │ ├── AdCampaignPageInfoByLastIdRequest.java
│ │ ├── AdCampaignPageInfoByLastIdResponseData.java
│ │ ├── AdCampaignPageInfoByLastIdResponseDataStruct.java
│ │ ├── AdCampaignPageInfoListStruct.java
│ │ ├── AdCampaignPageInfoRequest.java
│ │ ├── AdCampaignPageInfoResponseData.java
│ │ ├── AdCampaignPauseToggleRequest.java
│ │ ├── AdCreativeDelRequest.java
│ │ ├── AdCreativePageInfoByLastIdDataStruct.java
│ │ ├── AdCreativePageInfoByLastIdRequest.java
│ │ ├── AdCreativePageInfoByLastIdResponseData.java
│ │ ├── AdCreativePageInfoListStruct.java
│ │ ├── AdCreativePageInfoRequest.java
│ │ ├── AdCreativePageInfoResponseData.java
│ │ ├── AdCreativePauseToggleRequest.java
│ │ ├── AdCreativeQueryAuditStateListStruct.java
│ │ ├── AdCreativeQueryAuditStateRequest.java
│ │ ├── AdCreativeQueryAuditStateResponseData.java
│ │ ├── AdDmpTagGetAdvertiserTagsRequest.java
│ │ ├── AdDmpTagGetAdvertiserTagsResponseData.java
│ │ ├── AdDmpTagGetCrowdsRequest.java
│ │ ├── AdDmpTagGetCrowdsResponseData.java
│ │ ├── AdDmpTagGetNewBaseTagsRequest.java
│ │ ├── AdDmpTagGetNewBaseTagsResponseData.java
│ │ ├── AdGroupAddRequest.java
│ │ ├── AdGroupBatchDelRequest.java
│ │ ├── AdGroupBatchEditDailyBudgetRequest.java
│ │ ├── AdGroupBatchEditDateRequest.java
│ │ ├── AdGroupBatchEditPriceRequest.java
│ │ ├── AdGroupBatchEditTimeRequest.java
│ │ ├── AdGroupCvTypeGetRequest.java
│ │ ├── AdGroupCvTypeGetResponseData.java
│ │ ├── AdGroupEditByIdRequest.java
│ │ ├── AdGroupEditNameRequest.java
│ │ ├── AdGroupPageInfoByLastIdRequest.java
│ │ ├── AdGroupPageInfoByLastIdResponseData.java
│ │ ├── AdGroupPageInfoByLastIdResponseDataStruct.java
│ │ ├── AdGroupPageInfoListStruct.java
│ │ ├── AdGroupPageInfoRequest.java
│ │ ├── AdGroupPageInfoResponseData.java
│ │ ├── AdGroupPauseToggleRequest.java
│ │ ├── AdGroupQuerySkipSwitchRequest.java
│ │ ├── AdGroupQuerySkipSwitchResponseData.java
│ │ ├── AdSearchWordDtosStruct.java
│ │ ├── AdSubCreativeDtosStruct.java
│ │ ├── AdSugKeyWordDtosStruct.java
│ │ ├── AdSugKeywordDelRequest.java
│ │ ├── AdSugKeywordEditMatchTypeRequest.java
│ │ ├── AdSugKeywordEditPauseStateRequest.java
│ │ ├── AdSugKeywordEditPriceRequest.java
│ │ ├── AdSugKeywordEditSiteUrlRequest.java
│ │ ├── AdSugRecommendQueryItemsStruct.java
│ │ ├── AdSugRecommendQueryListStruct.java
│ │ ├── AdSugRecommendQueryRequest.java
│ │ ├── AdSugRecommendQueryResponse.java
│ │ ├── AudienceDtoStruct.java
│ │ ├── AudienceInfoStruct.java
│ │ ├── BaseTagResDto.java
│ │ ├── CategoriesStruct.java
│ │ ├── CreativeListStruct.java
│ │ ├── CustomizeCreativeListStruct.java
│ │ ├── CvTypeDetailStruct.java
│ │ ├── DpaGoodsConfigStruct.java
│ │ ├── FilterConfigVoStruct.java
│ │ ├── InstallBehaviorStruct.java
│ │ ├── OcpxCvTypeVoListStruct.java
│ │ ├── OcpxSecondCvTypeVoListStruct.java
│ │ ├── OcpxTransitionVoListStruct.java
│ │ ├── PageInfoStruct.java
│ │ ├── ProgramAdSearchWordDtosStruct.java
│ │ ├── PurposewordCategoryListStruct.java
│ │ ├── PurposewordCategoryRequest.java
│ │ ├── PurposewordCategoryResponseData.java
│ │ ├── PurposewordListListStruct.java
│ │ ├── PurposewordListRequest.java
│ │ ├── PurposewordListResponseData.java
│ │ ├── StartBehaviorStruct.java
│ │ └── WordDtoListStruct.java
│ └── token
│ │ ├── Oauth2RefreshTokenRequest.java
│ │ ├── Oauth2RefreshTokenResponseData.java
│ │ ├── Oauth2TokenRequest.java
│ │ └── Oauth2TokenResponseData.java
│ ├── service
│ └── VivoSdkService.java
│ └── token
│ └── VivoExternalTokenService.java
├── pom.xml
├── spring-boot-demo
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── test
│ │ ├── AppProperties.java
│ │ ├── MarketingApiTestApp.java
│ │ ├── auth
│ │ ├── RefreshCronService.java
│ │ ├── TokenAuthorizer.java
│ │ ├── bean
│ │ │ ├── AuthToken.java
│ │ │ └── Result.java
│ │ ├── oceanengine
│ │ │ ├── OceanAccountService.java
│ │ │ ├── OceanAuthorizer.java
│ │ │ ├── OceanProperties.java
│ │ │ └── OceanRefreshCronService.java
│ │ ├── repo
│ │ │ └── RedisTokenRepo.java
│ │ ├── service
│ │ │ └── AuthService.java
│ │ ├── tencent
│ │ │ ├── TencentAccountService.java
│ │ │ ├── TencentAuthorizer.java
│ │ │ ├── TencentProperties.java
│ │ │ └── TencentRefreshCronService.java
│ │ └── vivo
│ │ │ ├── VivoAuthorizer.java
│ │ │ ├── VivoProperties.java
│ │ │ └── VivoRefreshCronService.java
│ │ ├── config
│ │ ├── HttpConfig.java
│ │ ├── RefreshTokenConfiguration.java
│ │ └── SwaggerConfig.java
│ │ ├── constant
│ │ └── ChannelConstants.java
│ │ ├── controller
│ │ ├── AuthWebController.java
│ │ ├── KuaishouApiTest.java
│ │ ├── OceanEngineApiTest.java
│ │ ├── TencentApiTest.java
│ │ └── VivoApiTest.java
│ │ ├── token
│ │ ├── bean
│ │ │ ├── KshToken.java
│ │ │ ├── OceanToken.java
│ │ │ ├── TencentToken.java
│ │ │ └── VivoToken.java
│ │ └── service
│ │ │ ├── KuaishouTokenService.java
│ │ │ ├── OceanEngineTokenService.java
│ │ │ ├── TencentTokenService.java
│ │ │ └── VivoTokenService.java
│ │ └── util
│ │ ├── FileUtil.java
│ │ ├── RedisClient.java
│ │ ├── RedisKeys.java
│ │ ├── ResultConverter.java
│ │ └── Util.java
│ └── resources
│ ├── application-prod.yaml
│ ├── application-test.yaml
│ └── application.yaml
└── spring-boot-starters
├── kuaishou-spring-boot-starter
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── hyq0719
│ │ └── spring
│ │ └── starter
│ │ └── mktapi
│ │ └── kuaishou
│ │ ├── config
│ │ ├── CronJobAutoConfiguration.java
│ │ ├── HttpAutoConfiguration.java
│ │ └── KshAutoConfiguration.java
│ │ └── properties
│ │ └── SdkProperties.java
│ └── resources
│ └── META-INF
│ └── spring.factories
├── oceanengine-spring-boot-starter
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── hyq0719
│ │ └── spring
│ │ └── starter
│ │ └── mktapi
│ │ └── oceanengine
│ │ ├── config
│ │ ├── CronJobAutoConfiguration.java
│ │ ├── HttpAutoConfiguration.java
│ │ └── OceanAutoConfiguration.java
│ │ └── properties
│ │ └── SdkProperties.java
│ └── resources
│ └── META-INF
│ └── spring.factories
├── pom.xml
├── production-spring-boot-starter
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── hyq0719
│ │ └── spring
│ │ └── starter
│ │ └── mktapi
│ │ └── production
│ │ ├── config
│ │ ├── CronJobAutoConfiguration.java
│ │ ├── HttpAutoConfiguration.java
│ │ ├── KshAutoConfiguration.java
│ │ ├── OceanAutoConfiguration.java
│ │ ├── TencentAutoConfiguration.java
│ │ └── VivoAutoConfiguration.java
│ │ └── properties
│ │ └── SdkProperties.java
│ └── resources
│ └── META-INF
│ └── spring.factories
├── tencent-spring-boot-starter
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── hyq0719
│ │ └── spring
│ │ └── starter
│ │ └── mktapi
│ │ └── tencent
│ │ ├── config
│ │ ├── CronJobAutoConfiguration.java
│ │ ├── HttpAutoConfiguration.java
│ │ └── TencentAutoConfiguration.java
│ │ └── properties
│ │ └── SdkProperties.java
│ └── resources
│ └── META-INF
│ └── spring.factories
└── vivo-spring-boot-starter
├── pom.xml
└── src
└── main
├── java
└── com
│ └── hyq0719
│ └── spring
│ └── starter
│ └── mktapi
│ └── vivo
│ ├── config
│ ├── CronJobAutoConfiguration.java
│ ├── HttpAutoConfiguration.java
│ └── VivoAutoConfiguration.java
│ └── properties
│ └── SdkProperties.java
└── resources
└── META-INF
└── spring.factories
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig: http://editorconfig.org/
2 |
3 | root = true
4 |
5 | [*]
6 | indent_style = space
7 | indent_size = 2
8 | end_of_line = lf
9 | charset = utf-8
10 | trim_trailing_whitespace = true
11 | insert_final_newline = true
12 |
13 | [*.md]
14 | trim_trailing_whitespace = false
15 |
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/code-generators/oceanengine-code-generator/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | io.github.hyq0719
7 | marketing-api-generators
8 | 1.0.0-beta.2
9 |
10 | 4.0.0
11 |
12 | marketing-api-generator-oceanengine
13 | Marketing API - Code Generator for Ocean Engine
14 | Marketing API 类代码生成器 巨量引擎开放平台
15 |
16 |
17 | ${java.version}
18 | ${java.version}
19 | true
20 |
21 |
22 |
--------------------------------------------------------------------------------
/code-generators/oceanengine-code-generator/src/main/java/com/hyq0719/mktapi/generator/oceanengine/entity/BaseClassInfo.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.oceanengine.entity;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class BaseClassInfo {
7 | private String packageName;
8 | private String comments;
9 | private String author;
10 | private String email;
11 | private String datetime;
12 |
13 | public BaseClassInfo packageName(String packageName) {
14 | this.packageName = packageName;
15 | return this;
16 | }
17 |
18 | public BaseClassInfo comments(String comments) {
19 | this.comments = comments;
20 | return this;
21 | }
22 |
23 | public BaseClassInfo author(String author) {
24 | this.author = author;
25 | return this;
26 | }
27 |
28 | public BaseClassInfo email(String email) {
29 | this.email = email;
30 | return this;
31 | }
32 |
33 | public BaseClassInfo datetime(String datetime) {
34 | this.datetime = datetime;
35 | return this;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/code-generators/oceanengine-code-generator/src/main/java/com/hyq0719/mktapi/generator/oceanengine/entity/BaseEntity.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.oceanengine.entity;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class BaseEntity {
7 | private String snakeProperty;
8 | private String camelProperty;
9 | private String description;
10 | private String type;
11 |
12 | public BaseEntity(String snakeProperty, String camelProperty, String description, String type) {
13 | this.snakeProperty = snakeProperty;
14 | this.camelProperty = camelProperty;
15 | this.description = description;
16 | this.type = type;
17 | }
18 |
19 | public BaseEntity snakeProperty(String snakeProperty) {
20 | this.snakeProperty = snakeProperty;
21 | return this;
22 | }
23 |
24 | public BaseEntity camelProperty(String camelProperty) {
25 | this.camelProperty = camelProperty;
26 | return this;
27 | }
28 |
29 | public BaseEntity description(String description) {
30 | this.description = description;
31 | return this;
32 | }
33 |
34 | public BaseEntity type(String type) {
35 | this.type = type;
36 | return this;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/code-generators/oceanengine-code-generator/src/main/java/com/hyq0719/mktapi/generator/oceanengine/entity/CrawlerResult.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.oceanengine.entity;
2 |
3 | import com.google.gson.Gson;
4 | import lombok.Data;
5 |
6 | import java.util.List;
7 | import java.util.Map;
8 |
9 | @Data
10 | public class CrawlerResult {
11 | private String classPrefix;
12 | private Map> requestEntityMap;
13 | private Map> responseEntityMap;
14 |
15 | @Override
16 | public String toString() {
17 | Gson gson = new Gson();
18 | return "classPrefix: " + classPrefix + "\n" + "requestEntityMap: " + gson.toJson(requestEntityMap) + "\n"
19 | + "responseEntityMap: " + gson.toJson(responseEntityMap);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/code-generators/oceanengine-code-generator/src/main/java/com/hyq0719/mktapi/generator/oceanengine/entity/GeneratorConfigEntity.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.oceanengine.entity;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.Map;
6 |
7 | /**
8 | * @program: dashboard
9 | * @description:
10 | * @author: wuning
11 | * @create: 2020-09-29 10:42
12 | **/
13 | @Data
14 | public class GeneratorConfigEntity {
15 | private String mainPackage;
16 | private Person person;
17 | private Map generatorJavaMap;
18 |
19 | @Data
20 | public static class Person {
21 | String author;
22 | String email;
23 | }
24 |
25 | @Data
26 | public static class JavaMap {
27 | String packageName;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/code-generators/oceanengine-code-generator/src/main/java/com/hyq0719/mktapi/generator/oceanengine/entity/SingleFileEntity.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.oceanengine.entity;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 |
7 | @Data
8 | public class SingleFileEntity {
9 | private BaseClassInfo baseClassInfo;
10 | private Boolean isRequest;
11 | private String className;
12 | private List list;
13 | private List importList;
14 |
15 | public SingleFileEntity baseClassInfo(BaseClassInfo baseClassInfo) {
16 | this.baseClassInfo = baseClassInfo;
17 | return this;
18 | }
19 |
20 | public SingleFileEntity isRequest(Boolean isRequest) {
21 | this.isRequest = isRequest;
22 | return this;
23 | }
24 |
25 | public SingleFileEntity className(String className) {
26 | this.className = className;
27 | return this;
28 | }
29 |
30 | public SingleFileEntity list(List list) {
31 | this.list = list;
32 | return this;
33 | }
34 |
35 | public SingleFileEntity importList(List importList) {
36 | this.importList = importList;
37 | return this;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/code-generators/oceanengine-code-generator/src/main/resources/generator.yml:
--------------------------------------------------------------------------------
1 | # 工程目录
2 | mainPackage: com.hyq0719.mktapi.generator.oceanengine
3 |
4 | # 使用信息
5 | person:
6 | # 作者
7 | author: hyq0719
8 | # Email
9 | email: yueqi.huang@qq.com
10 |
11 |
12 | # 自定义代码生成配置
13 | generatorJavaMap:
14 | default:
15 | packageName: com.hyq0719.mktapi.generator.oceanengine.bean
16 |
--------------------------------------------------------------------------------
/code-generators/tencent-code-generator/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | io.github.hyq0719
7 | marketing-api-generators
8 | 1.0.0-beta.2
9 |
10 | 4.0.0
11 |
12 | tencent-code-generator
13 | Marketing API - Code Generator for Tencent
14 | Marketing API 类代码生成器 腾讯广告
15 |
16 |
17 | 8
18 | 8
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/code-generators/tencent-code-generator/src/main/java/com/hyq0719/mktapi/generator/tencent/entity/BaseClassInfo.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.tencent.entity;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class BaseClassInfo {
7 | private String packageName;
8 | private String comments;
9 | private String author;
10 | private String email;
11 | private String datetime;
12 |
13 | public BaseClassInfo packageName(String packageName) {
14 | this.packageName = packageName;
15 | return this;
16 | }
17 |
18 | public BaseClassInfo comments(String comments) {
19 | this.comments = comments;
20 | return this;
21 | }
22 |
23 | public BaseClassInfo author(String author) {
24 | this.author = author;
25 | return this;
26 | }
27 |
28 | public BaseClassInfo email(String email) {
29 | this.email = email;
30 | return this;
31 | }
32 |
33 | public BaseClassInfo datetime(String datetime) {
34 | this.datetime = datetime;
35 | return this;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/code-generators/tencent-code-generator/src/main/java/com/hyq0719/mktapi/generator/tencent/entity/BaseEntity.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.tencent.entity;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class BaseEntity {
7 | private String snakeProperty;
8 | private String camelProperty;
9 | private String description;
10 | private String type;
11 |
12 | public BaseEntity(String snakeProperty, String camelProperty, String description, String type) {
13 | this.snakeProperty = snakeProperty;
14 | this.camelProperty = camelProperty;
15 | this.description = description;
16 | this.type = type;
17 | }
18 |
19 | public BaseEntity snakeProperty(String snakeProperty) {
20 | this.snakeProperty = snakeProperty;
21 | return this;
22 | }
23 |
24 | public BaseEntity camelProperty(String camelProperty) {
25 | this.camelProperty = camelProperty;
26 | return this;
27 | }
28 |
29 | public BaseEntity description(String description) {
30 | this.description = description;
31 | return this;
32 | }
33 |
34 | public BaseEntity type(String type) {
35 | this.type = type;
36 | return this;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/code-generators/tencent-code-generator/src/main/java/com/hyq0719/mktapi/generator/tencent/entity/CrawlerResult.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.tencent.entity;
2 |
3 | import com.google.gson.Gson;
4 | import lombok.Data;
5 |
6 | import java.util.List;
7 | import java.util.Map;
8 |
9 | @Data
10 | public class CrawlerResult {
11 | private String classPrefix;
12 | private Map> requestEntityMap;
13 | private Map> responseEntityMap;
14 |
15 | @Override
16 | public String toString() {
17 | Gson gson = new Gson();
18 | return "classPrefix: " + classPrefix + "\n" + "requestEntityMap: " + gson.toJson(requestEntityMap) + "\n"
19 | + "responseEntityMap: " + gson.toJson(responseEntityMap);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/code-generators/tencent-code-generator/src/main/java/com/hyq0719/mktapi/generator/tencent/entity/GeneratorConfigEntity.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.tencent.entity;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.Map;
6 |
7 | /**
8 | * @program: dashboard
9 | * @description:
10 | * @author: wuning
11 | * @create: 2020-09-29 10:42
12 | **/
13 | @Data
14 | public class GeneratorConfigEntity {
15 | private String mainPackage;
16 | private Person person;
17 | private Map generatorJavaMap;
18 |
19 | @Data
20 | public static class Person {
21 | String author;
22 | String email;
23 | }
24 |
25 | @Data
26 | public static class JavaMap {
27 | String packageName;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/code-generators/tencent-code-generator/src/main/java/com/hyq0719/mktapi/generator/tencent/entity/SingleFileEntity.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.tencent.entity;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 |
7 | @Data
8 | public class SingleFileEntity {
9 | private BaseClassInfo baseClassInfo;
10 | private Boolean isRequest;
11 | private String className;
12 | private List list;
13 | private List importList;
14 |
15 | public SingleFileEntity baseClassInfo(BaseClassInfo baseClassInfo) {
16 | this.baseClassInfo = baseClassInfo;
17 | return this;
18 | }
19 |
20 | public SingleFileEntity isRequest(Boolean isRequest) {
21 | this.isRequest = isRequest;
22 | return this;
23 | }
24 |
25 | public SingleFileEntity className(String className) {
26 | this.className = className;
27 | return this;
28 | }
29 |
30 | public SingleFileEntity list(List list) {
31 | this.list = list;
32 | return this;
33 | }
34 |
35 | public SingleFileEntity importList(List importList) {
36 | this.importList = importList;
37 | return this;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/code-generators/tencent-code-generator/src/main/java/com/hyq0719/mktapi/generator/tencent/handler/CrawlerHandler.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.tencent.handler;
2 |
3 | import org.openqa.selenium.By;
4 | import org.openqa.selenium.WebDriver;
5 | import org.openqa.selenium.chrome.ChromeDriver;
6 | import org.openqa.selenium.support.ui.ExpectedConditions;
7 | import org.openqa.selenium.support.ui.WebDriverWait;
8 |
9 | public class CrawlerHandler {
10 |
11 | public static boolean waitForElementVisible(final By by, WebDriver webDriver, int seconds) {
12 | try {
13 | new WebDriverWait(webDriver, seconds).until(ExpectedConditions.visibilityOfElementLocated(by));
14 | return true;
15 | } catch (Exception e) {
16 | return false;
17 | }
18 | }
19 |
20 | public static ChromeDriver crawler(String url) {
21 | ChromeDriver driver = new ChromeDriver();
22 | driver.get(url);
23 | By tableBy = By.tagName("table");
24 | if (waitForElementVisible(tableBy, driver, 2)) {
25 | return driver;
26 | }
27 | throw new RuntimeException("Crawler error");
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/code-generators/tencent-code-generator/src/main/resources/generator.yml:
--------------------------------------------------------------------------------
1 | # 工程目录
2 | mainPackage: com.hyq0719.mktapi.generator.tencent
3 |
4 | # 使用信息
5 | person:
6 | # 作者
7 | author: hyq0719
8 | # Email
9 | email: yueqi.huang@qq.com
10 |
11 |
12 | # 自定义代码生成配置
13 | generatorJavaMap:
14 | default:
15 | packageName: com.hyq0719.mktapi.generator.tencent.bean
16 |
--------------------------------------------------------------------------------
/code-generators/vivo-code-generator/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | io.github.hyq0719
7 | marketing-api-generators
8 | 1.0.0-beta.2
9 |
10 | 4.0.0
11 |
12 | marketing-api-generator-vivo
13 | Marketing API - Code Generator for VIVO
14 | Marketing API 类代码生成器 Vivo商业开放平台
15 |
16 |
17 | ${java.version}
18 | ${java.version}
19 | true
20 |
21 |
22 |
--------------------------------------------------------------------------------
/code-generators/vivo-code-generator/src/main/java/com/hyq0719/mktapi/generator/vivo/entity/BaseClassInfo.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.vivo.entity;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class BaseClassInfo {
7 | private String packageName;
8 | private String comments;
9 | private String author;
10 | private String email;
11 | private String datetime;
12 |
13 | public BaseClassInfo packageName(String packageName) {
14 | this.packageName = packageName;
15 | return this;
16 | }
17 |
18 | public BaseClassInfo comments(String comments) {
19 | this.comments = comments;
20 | return this;
21 | }
22 |
23 | public BaseClassInfo author(String author) {
24 | this.author = author;
25 | return this;
26 | }
27 |
28 | public BaseClassInfo email(String email) {
29 | this.email = email;
30 | return this;
31 | }
32 |
33 | public BaseClassInfo datetime(String datetime) {
34 | this.datetime = datetime;
35 | return this;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/code-generators/vivo-code-generator/src/main/java/com/hyq0719/mktapi/generator/vivo/entity/BaseEntity.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.vivo.entity;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class BaseEntity {
7 | private String camelProperty;
8 | private String description;
9 | private String type;
10 |
11 | public BaseEntity(String camelProperty, String description, String type) {
12 | this.camelProperty = camelProperty;
13 | this.description = description;
14 | this.type = type;
15 | }
16 |
17 | public BaseEntity camelProperty(String camelProperty) {
18 | this.camelProperty = camelProperty;
19 | return this;
20 | }
21 |
22 | public BaseEntity description(String description) {
23 | this.description = description;
24 | return this;
25 | }
26 |
27 | public BaseEntity type(String type) {
28 | this.type = type;
29 | return this;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/code-generators/vivo-code-generator/src/main/java/com/hyq0719/mktapi/generator/vivo/entity/CrawlerResult.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.vivo.entity;
2 |
3 | import com.google.gson.Gson;
4 | import lombok.Data;
5 |
6 | import java.util.List;
7 | import java.util.Map;
8 |
9 | @Data
10 | public class CrawlerResult {
11 | private String classPrefix;
12 | private Map> requestEntityMap;
13 | private Map> responseEntityMap;
14 |
15 | @Override
16 | public String toString() {
17 | Gson gson = new Gson();
18 | return "classPrefix: " + classPrefix
19 | + "\n" + "requestEntityMap: " + gson.toJson(requestEntityMap)
20 | + "\n" + "responseEntityMap: " + gson.toJson(responseEntityMap);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/code-generators/vivo-code-generator/src/main/java/com/hyq0719/mktapi/generator/vivo/entity/GeneratorConfigEntity.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.vivo.entity;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.Map;
6 |
7 | /**
8 | * @program: dashboard
9 | * @description:
10 | * @author: wuning
11 | * @create: 2020-09-29 10:42
12 | **/
13 | @Data
14 | public class GeneratorConfigEntity {
15 | private String mainPackage;
16 | private Person person;
17 | private Map generatorJavaMap;
18 |
19 | @Data
20 | public static class Person {
21 | String author;
22 | String email;
23 | }
24 |
25 | @Data
26 | public static class JavaMap {
27 | String packageName;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/code-generators/vivo-code-generator/src/main/java/com/hyq0719/mktapi/generator/vivo/entity/SingleFileEntity.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.vivo.entity;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 |
7 | @Data
8 | public class SingleFileEntity {
9 | private BaseClassInfo baseClassInfo;
10 | private Boolean isRequest;
11 | private String className;
12 | private List list;
13 | private List importList;
14 |
15 | public SingleFileEntity baseClassInfo(BaseClassInfo baseClassInfo) {
16 | this.baseClassInfo = baseClassInfo;
17 | return this;
18 | }
19 |
20 | public SingleFileEntity isRequest(Boolean isRequest) {
21 | this.isRequest = isRequest;
22 | return this;
23 | }
24 |
25 | public SingleFileEntity className(String className) {
26 | this.className = className;
27 | return this;
28 | }
29 |
30 | public SingleFileEntity list(List list) {
31 | this.list = list;
32 | return this;
33 | }
34 |
35 | public SingleFileEntity importList(List importList) {
36 | this.importList = importList;
37 | return this;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/code-generators/vivo-code-generator/src/main/java/com/hyq0719/mktapi/generator/vivo/handler/CrawlerHandler.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.generator.vivo.handler;
2 |
3 | import org.openqa.selenium.By;
4 | import org.openqa.selenium.WebDriver;
5 | import org.openqa.selenium.chrome.ChromeDriver;
6 | import org.openqa.selenium.support.ui.ExpectedConditions;
7 | import org.openqa.selenium.support.ui.WebDriverWait;
8 |
9 | public class CrawlerHandler {
10 |
11 | public static boolean waitForElementVisible(final By by, WebDriver webDriver, int seconds) {
12 | try {
13 | new WebDriverWait(webDriver, seconds).until(ExpectedConditions.visibilityOfElementLocated(by));
14 | return true;
15 | } catch (Exception e) {
16 | return false;
17 | }
18 | }
19 |
20 | public static ChromeDriver crawler(String url) {
21 | ChromeDriver driver = new ChromeDriver();
22 | driver.get(url);
23 | By tableBy = By.tagName("table");
24 | if (waitForElementVisible(tableBy, driver, 2)) {
25 | return driver;
26 | }
27 | throw new RuntimeException("Crawler error");
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/code-generators/vivo-code-generator/src/main/resources/generator.yml:
--------------------------------------------------------------------------------
1 | # 工程目录
2 | mainPackage: com.hyq0719.mktapi.generator.vivo
3 |
4 | # 使用信息
5 | person:
6 | # 作者
7 | author: hyq0719
8 | # Email
9 | email: yueqi.huang@qq.com
10 |
11 |
12 | # 自定义代码生成配置
13 | generatorJavaMap:
14 | default:
15 | packageName: com.hyq0719.mktapi.generator.vivo.bean
16 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/RetryStrategy.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common;
2 |
3 | /**
4 | * api请求重试策略
5 | *
6 | * @author hyq0719
7 | */
8 | public interface RetryStrategy {
9 |
10 | /**
11 | * 重试次数,默认为3次
12 | *
13 | * @return 重试次数
14 | */
15 | default Integer retryCount() {
16 | return 3;
17 | }
18 |
19 | /**
20 | * 根据各渠道返回码判断是否重试
21 | *
22 | * @return 重试条件
23 | */
24 | default Boolean retryCondition(Long code) {
25 | return false;
26 | }
27 |
28 | /**
29 | * 是否开启重试
30 | *
31 | * @return 是否开启重试
32 | */
33 | default Boolean enable() {
34 | return true;
35 | }
36 |
37 | /**
38 | * 根据返回码判断token是否过期
39 | *
40 | * @param code 请求返回码
41 | * @return token是否过期
42 | */
43 | default Boolean isTokenExpired(Long code) {
44 | return false;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/advice/ApiRequestAdvice.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.advice;
2 |
3 | import com.hyq0719.mktapi.common.ApiResponse;
4 |
5 | /**
6 | * api请求增强,类似AOP
7 | *
8 | * @author hyq0719
9 | */
10 | @FunctionalInterface
11 | public interface ApiRequestAdvice {
12 |
13 | /**
14 | * 请求前执行
15 | */
16 | default void before() {
17 |
18 | }
19 |
20 | /**
21 | * 请求后执行
22 | *
23 | * @param response 请求的返回内容
24 | */
25 | void after(ApiResponse response);
26 | }
27 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/annotation/ApiRequestMapping.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.annotation;
2 |
3 |
4 | import com.hyq0719.mktapi.common.constant.RequestConstants;
5 |
6 | import java.lang.annotation.*;
7 |
8 | /**
9 | * 请求参数注解
10 | *
11 | * @author hyq0719
12 | */
13 | @Target({ElementType.METHOD, ElementType.TYPE})
14 | @Retention(RetentionPolicy.RUNTIME)
15 | @Inherited
16 | public @interface ApiRequestMapping {
17 | /**
18 | * 请求路径后缀,和BaseUrl拼接
19 | *
20 | * @return 请求路径后缀
21 | */
22 | String value();
23 |
24 | /**
25 | * 请求版本号,默认从BaseUrl获取
26 | *
27 | * @return 请求版本号
28 | */
29 | String version() default "";
30 |
31 | /**
32 | * 请求host地址,默认从BaseUrl获取
33 | *
34 | * @return 请求host地址
35 | */
36 | String host() default "";
37 |
38 | /**
39 | * 请求方法:GET,POST等
40 | *
41 | * @return 请求方法
42 | */
43 | String method();
44 |
45 | /**
46 | * 是否使用请求体,默认为true
47 | *
48 | * @return 是否使用请求体
49 | */
50 | boolean usePostBody() default true;
51 |
52 | /**
53 | * 请求头中的Content-Type
54 | *
55 | * @return Content-Type
56 | */
57 | String[] contentTypes() default {RequestConstants.CONTENT_TYPE_JSON, RequestConstants.CONTENT_TYPE_XML};
58 | }
59 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/constant/AuthConstants.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.constant;
2 |
3 | /**
4 | * 各渠道请求中的授权参数
5 | *
6 | * @author hyq0719
7 | */
8 | public interface AuthConstants {
9 |
10 | /**
11 | * tencent auth []
12 | */
13 | String[] TENCENT_AUTH = new String[]{"accessToken", "nonce", "timestamp"};
14 |
15 | /**
16 | * ocean engine auth[]
17 | */
18 | String[] OCEAN_ENGINE_AUTH = new String[]{"Access-Token"};
19 |
20 | /**
21 | * kuaishou auth[]
22 | */
23 | String[] KUAISHOU_AUTH = new String[]{"Access-Token"};
24 |
25 | /**
26 | * vivo auth []
27 | */
28 | String[] VIVO_AUTH = new String[]{"accessToken", "nonce", "timestamp"};
29 | }
30 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/constant/RequestConstants.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.constant;
2 |
3 | public interface RequestConstants {
4 | /**
5 | * method
6 | */
7 | String GET = "GET";
8 | String POST = "POST";
9 | String PUT = "PUT";
10 | String DELETE = "DELETE";
11 |
12 | /**
13 | * application/json
14 | */
15 | String[] ACCEPT_JSON = new String[]{"application/json"};
16 |
17 | /**
18 | * text/plain
19 | */
20 | String CONTENT_TYPE_TEXT_PLAIN = "text/plain";
21 | /**
22 | * application/json
23 | */
24 | String CONTENT_TYPE_JSON = "application/json";
25 | /**
26 | * application/xml
27 | */
28 | String CONTENT_TYPE_XML = "application/xml";
29 | /**
30 | * multipart/form-data
31 | */
32 | String CONTENT_TYPE_MULTIPART_FORM_DATA = "multipart/form-data";
33 |
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/executor/http/HttpHandler.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.executor.http;
2 |
3 | import com.hyq0719.mktapi.common.ApiResponse;
4 | import com.hyq0719.mktapi.common.exception.ApiException;
5 | import com.hyq0719.mktapi.common.executor.parameter.RequestParam;
6 | import com.hyq0719.mktapi.common.util.JSON;
7 |
8 | import java.lang.reflect.Type;
9 |
10 | /**
11 | * 网络请求处理器
12 | *
13 | * @author hyq0719
14 | */
15 | public interface HttpHandler {
16 |
17 | /**
18 | * 执行网络请求
19 | *
20 | * @param param 请求参数
21 | * @param returnType 请求返回Type
22 | * @param 请求返回类型
23 | * @return ApiResponse
24 | * @throws ApiException
25 | */
26 | ApiResponse execute(RequestParam param, Type returnType) throws ApiException;
27 |
28 | /**
29 | * 构造请求url
30 | *
31 | * @param param 请求参数
32 | * @return 请求url
33 | */
34 | String buildUrl(RequestParam param);
35 |
36 | /**
37 | * 获取JSON序列化工具
38 | *
39 | * @return JSON序列化工具
40 | */
41 | JSON getJSON();
42 | }
43 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/executor/parameter/BaseUrl.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.executor.parameter;
2 |
3 | import lombok.Builder;
4 | import lombok.Data;
5 |
6 | /**
7 | * 请求基础url
8 | *
9 | * @author hyq0719
10 | */
11 | @Data
12 | @Builder
13 | public class BaseUrl {
14 | /**
15 | * 协议:http,https
16 | */
17 | private String scheme;
18 | /**
19 | * host地址
20 | */
21 | private String host;
22 | /**
23 | * api版本
24 | */
25 | private String version;
26 |
27 | @Override
28 | public String toString() {
29 | return scheme + "://" + host + "/" + version;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/executor/parameter/Pair.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.executor.parameter;
2 |
3 | import org.apache.http.NameValuePair;
4 |
5 | public class Pair implements NameValuePair {
6 | private String name = "";
7 | private String value = "";
8 |
9 | public Pair(String name, String value) {
10 | setName(name);
11 | setValue(value);
12 | }
13 |
14 | @Override
15 | public String getName() {
16 | return this.name;
17 | }
18 |
19 | private void setName(String name) {
20 | if (!isValidString(name)) {
21 | return;
22 | }
23 |
24 | this.name = name;
25 | }
26 |
27 | @Override
28 | public String getValue() {
29 | return this.value;
30 | }
31 |
32 | private void setValue(String value) {
33 | if (!isValidString(value)) {
34 | return;
35 | }
36 |
37 | this.value = value;
38 | }
39 |
40 | private boolean isValidString(String arg) {
41 | if (arg == null) {
42 | return false;
43 | }
44 | return !arg.trim().isEmpty();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/executor/parameter/ParamHandler.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.executor.parameter;
2 |
3 |
4 | public interface ParamHandler {
5 | RequestParam constructParameters(T t, String token);
6 |
7 | BaseUrl getBaseUrl();
8 |
9 | String[] getRequestContentTypes();
10 |
11 | String[] getLocalVarAuthNames();
12 |
13 | String getMethod();
14 |
15 | String getVersion();
16 |
17 | String getHost();
18 |
19 | String getStringToken(String accountId);
20 |
21 | String getAccountId(T t);
22 |
23 | String getLocalVarPath(); // 业务地址
24 |
25 | Boolean isUsePostBody();
26 |
27 | String[] getRequestAccept();
28 | }
29 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/token/CronService.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.token;
2 |
3 | public interface CronService {
4 | void run();
5 |
6 | void trigger();
7 | }
8 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/token/ExternalTokenService.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.token;
2 |
3 | import java.util.List;
4 |
5 | public interface ExternalTokenService {
6 |
7 | /**
8 | * 刷新所有token
9 | *
10 | * @return token列表
11 | */
12 | List refreshAllToken();
13 |
14 | /**
15 | * 刷新单个token
16 | *
17 | * @param tokenKey token key
18 | * @return token
19 | */
20 | IToken refreshToken(String tokenKey);
21 | }
22 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/token/IToken.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.token;
2 |
3 | public interface IToken {
4 |
5 | String getTokenKey();
6 |
7 | String getToken();
8 |
9 | T getConfig();
10 | }
11 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/token/cache/ITokenLocalCache.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.token.cache;
2 |
3 |
4 | import com.hyq0719.mktapi.common.token.IToken;
5 |
6 | public class ITokenLocalCache extends LocalCache {
7 | }
8 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/token/cache/LocalCache.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.token.cache;
2 |
3 | import java.util.Map;
4 | import java.util.concurrent.ConcurrentHashMap;
5 |
6 | public class LocalCache {
7 |
8 | /**
9 | * 存放token,保证线程安全
10 | */
11 | private Map cache = new ConcurrentHashMap<>();
12 |
13 | /**
14 | * 存token
15 | *
16 | * @param key token key
17 | * @param value token值
18 | */
19 | public void put(K key, V value) {
20 | cache.put(key, value);
21 | }
22 |
23 | /**
24 | * 取token
25 | *
26 | * @param key token key
27 | * @return token值
28 | */
29 | public V get(K key) {
30 | return cache.get(key);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/util/DataPageFetcher.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.util;
2 |
3 | public interface DataPageFetcher {
4 | }
5 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/util/DigestUtil.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.util;
2 |
3 | import java.security.MessageDigest;
4 |
5 | public class DigestUtil {
6 |
7 | // 盐,用于混交md5
8 | private static final String SLAT = "&%5123***&&%%$$#@";
9 |
10 | public static String encrypt(String dataStr) {
11 | try {
12 | dataStr = dataStr + SLAT;
13 | MessageDigest m = MessageDigest.getInstance("MD5");
14 | m.update(dataStr.getBytes("UTF8"));
15 | byte[] s = m.digest();
16 | StringBuilder result = new StringBuilder();
17 | for (int i = 0; i < s.length; i++) {
18 | result.append(Integer.toHexString((0x000000FF & s[i]) | 0xFFFFFF00).substring(6));
19 | }
20 | return result.toString();
21 | } catch (Exception e) {
22 | e.printStackTrace();
23 | }
24 |
25 | return "";
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/marketing-api-common/src/main/java/com/hyq0719/mktapi/common/util/JsonUtil.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.common.util;
2 |
3 | import com.google.gson.Gson;
4 |
5 | public class JsonUtil {
6 |
7 | private final static Gson GSON = new Gson();
8 |
9 | public static String toJsonString(Object obj) {
10 | return GSON.toJson(obj);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | marketing-api-sdk
7 | io.github.hyq0719
8 | 1.0.0-beta.2
9 |
10 | 4.0.0
11 |
12 | marketing-api-kuaishou
13 | 1.0.0-beta.2
14 | Marketing API - Kuaishou Java SDK
15 | 磁力引擎开放平台 Java SDK
16 |
17 |
18 | 8
19 | 8
20 |
21 |
22 |
23 |
24 | io.github.hyq0719
25 | marketing-api-common
26 | ${common.version}
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/KshApiClient.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou;
2 |
3 | import com.hyq0719.mktapi.common.ApiClient;
4 | import com.hyq0719.mktapi.common.executor.http.HttpHandler;
5 | import com.hyq0719.mktapi.common.token.ExternalTokenService;
6 | import com.hyq0719.mktapi.common.token.cache.ITokenLocalCache;
7 |
8 | public class KshApiClient extends ApiClient {
9 |
10 | public KshApiClient(ITokenLocalCache iTokenLocalCache, HttpHandler httpsClient,
11 | ExternalTokenService externalTokenService) {
12 | super(iTokenLocalCache, httpsClient, externalTokenService);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/KshRetryStrategy.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou;
2 |
3 | import com.hyq0719.mktapi.common.RetryStrategy;
4 |
5 |
6 | public class KshRetryStrategy implements RetryStrategy {
7 |
8 | private Integer retryCount = 10;
9 |
10 | private Boolean enable = true;
11 |
12 | public void setRetryCount(Integer retryCount) {
13 | if (retryCount == null) {
14 | return;
15 | }
16 | this.retryCount = retryCount;
17 | }
18 |
19 | public void setEnable(Boolean enable) {
20 | if (enable == null) {
21 | return;
22 | }
23 | this.enable = enable;
24 | }
25 |
26 | @Override
27 | public Integer retryCount() {
28 | return retryCount;
29 | }
30 |
31 | @Override
32 | public Boolean retryCondition(Long code) {
33 | return code == 400001;
34 | }
35 |
36 | @Override
37 | public Boolean enable() {
38 | return enable;
39 | }
40 |
41 | @Override
42 | public Boolean isTokenExpired(Long code) {
43 | return code == 402000 || code == 402004;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/api/AbstractKshApi.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.api;
2 |
3 | import com.hyq0719.mktapi.common.ApiClient;
4 | import com.hyq0719.mktapi.common.RetryStrategy;
5 | import com.hyq0719.mktapi.kuaishou.KshApiRequest;
6 |
7 | import java.lang.reflect.Method;
8 |
9 | public class AbstractKshApi {
10 |
11 | private final ApiClient apiClient;
12 | private final RetryStrategy retryStrategy;
13 |
14 | protected AbstractKshApi(ApiClient apiClient, RetryStrategy retryStrategy) {
15 | this.apiClient = apiClient;
16 | this.retryStrategy = retryStrategy;
17 | }
18 |
19 | public KshApiRequest init(Class classObj) {
20 | KshApiRequest request = null;
21 | try {
22 | request = (KshApiRequest) classObj.getDeclaredConstructors()[0].newInstance(this);
23 | Method methodSetConfig = classObj.getMethod("setConfig", ApiClient.class, RetryStrategy.class);
24 | methodSetConfig.invoke(request, apiClient, retryStrategy);
25 | } catch (Exception e) {
26 | e.printStackTrace();
27 | }
28 | return request;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/CodeKey.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean;
2 |
3 | public interface CodeKey {
4 | Long getCodeKey();
5 |
6 | String getMsg();
7 | }
8 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/IPage.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean;
2 |
3 | public interface IPage extends TokenKey {
4 | void exchangeCurrentPage(Integer page);
5 |
6 | Integer currentPageSize();
7 | }
8 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/TokenKey.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean;
2 |
3 | public interface TokenKey {
4 | String getTokenKey();
5 | }
6 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/ad_unit/AdUnitCreateResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.ad_unit;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdUnitCreateResponseStruct {
9 |
10 | @SerializedName("unit_id")
11 | private Long unitId = null;
12 |
13 | public AdUnitCreateResponseStruct unitId(Long unitId) {
14 | this.unitId = unitId;
15 | return this;
16 | }
17 |
18 | @Override
19 | public String toString() {
20 | Gson gson = new Gson();
21 | return gson.toJson(this);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/ad_unit/AdUnitUpdateBidRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.ad_unit;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import com.hyq0719.mktapi.kuaishou.bean.TokenKey;
6 | import lombok.Data;
7 |
8 | @Data
9 | public class AdUnitUpdateBidRequest implements TokenKey {
10 | @SerializedName("bid")
11 | private Long bid = null;
12 |
13 | @SerializedName("unit_id")
14 | private Long unitId = null;
15 |
16 | @SerializedName("advertiser_id")
17 | private Long advertiserId = null;
18 |
19 |
20 | public AdUnitUpdateBidRequest bid(Long bid) {
21 | this.bid = bid;
22 | return this;
23 | }
24 |
25 | public AdUnitUpdateBidRequest unitId(Long unitId) {
26 | this.unitId = unitId;
27 | return this;
28 | }
29 |
30 | public AdUnitUpdateBidRequest advertiserId(Long advertiserId) {
31 | this.advertiserId = advertiserId;
32 | return this;
33 | }
34 |
35 | @Override
36 | public String toString() {
37 | Gson gson = new Gson();
38 | return gson.toJson(this);
39 | }
40 |
41 | @Override
42 | public String getTokenKey() {
43 | return String.valueOf(advertiserId);
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/ad_unit/AdUnitUpdateResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.ad_unit;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class AdUnitUpdateResponseStruct {
11 | @SerializedName("unit_ids")
12 | private List unitIds = null;
13 |
14 | public AdUnitUpdateResponseStruct campaignId(List unitIds) {
15 | this.unitIds = unitIds;
16 | return this;
17 | }
18 |
19 | @Override
20 | public String toString() {
21 | Gson gson = new Gson();
22 | return gson.toJson(this);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/ad_unit/AdUnitUpdateStatusResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.ad_unit;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdUnitUpdateStatusResponseStruct {
9 | @SerializedName("unit_id")
10 | private Long unitId = null;
11 |
12 | public AdUnitUpdateStatusResponseStruct campaignId(Long unitId) {
13 | this.unitId = unitId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/ad_unit/AgeStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.ad_unit;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AgeStruct {
9 | @SerializedName("min")
10 | private Integer min = null;
11 |
12 | @SerializedName("max")
13 | private Integer max = null;
14 |
15 |
16 | public AgeStruct min(Integer min) {
17 | this.min = min;
18 | return this;
19 | }
20 |
21 | public AgeStruct max(Integer max) {
22 | this.max = max;
23 | return this;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | Gson gson = new Gson();
29 | return gson.toJson(this);
30 | }
31 |
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/ad_unit/BackflowForecastStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.ad_unit;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 | import lombok.Data;
5 |
6 | @Data
7 | public class BackflowForecastStruct {
8 | @SerializedName("backflow_cv_lower")
9 | private Long backflowCvLower;
10 |
11 | @SerializedName("backflow_cv_upper")
12 | private Long backflowCvUpper;
13 |
14 | @SerializedName("backflow_timestamp")
15 | private Long backflowTimestamp;
16 | }
17 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/ad_unit/DiverseDataStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.ad_unit;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class DiverseDataStruct {
9 | @SerializedName("device_os_type")
10 | private Integer deviceOsType = null;
11 |
12 | @SerializedName("app_name")
13 | private String appName = null;
14 |
15 | @SerializedName("app_package_name")
16 | private String appPackageName = null;
17 |
18 |
19 | public DiverseDataStruct deviceOsType(Integer deviceOsType) {
20 | this.deviceOsType = deviceOsType;
21 | return this;
22 | }
23 |
24 | public DiverseDataStruct appName(String appName) {
25 | this.appName = appName;
26 | return this;
27 | }
28 |
29 | public DiverseDataStruct appPackageName(String appPackageName) {
30 | this.appPackageName = appPackageName;
31 | return this;
32 | }
33 |
34 | @Override
35 | public String toString() {
36 | Gson gson = new Gson();
37 | return gson.toJson(this);
38 | }
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/ad_unit/GiftDataStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.ad_unit;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class GiftDataStruct {
9 | @SerializedName("target_action_type")
10 | private Integer targetActionType = null;
11 |
12 | @SerializedName("code")
13 | private String code = null;
14 |
15 |
16 | public GiftDataStruct targetActionType(Integer targetActionType) {
17 | this.targetActionType = targetActionType;
18 | return this;
19 | }
20 |
21 | public GiftDataStruct code(String code) {
22 | this.code = code;
23 | return this;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | Gson gson = new Gson();
29 | return gson.toJson(this);
30 | }
31 |
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/advertiser/AdvertiserBudgetGetRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.advertiser;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import com.hyq0719.mktapi.kuaishou.bean.TokenKey;
6 | import lombok.Data;
7 |
8 | @Data
9 | public class AdvertiserBudgetGetRequest implements TokenKey {
10 |
11 | @SerializedName("advertiser_id")
12 | private Long advertiserId;
13 |
14 | public AdvertiserBudgetGetRequest advertiserId(Long advertiserId) {
15 | this.advertiserId = advertiserId;
16 | return this;
17 | }
18 |
19 | @Override
20 | public String toString() {
21 | Gson gson = new Gson();
22 | return gson.toJson(this);
23 | }
24 |
25 | @Override
26 | public String getTokenKey() {
27 | return String.valueOf(advertiserId);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/advertiser/AdvertiserBudgetGetResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.advertiser;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 | import lombok.Data;
5 |
6 | @Data
7 | public class AdvertiserBudgetGetResponseStruct {
8 | @SerializedName("day_budget")
9 | private Long dayBudget;
10 |
11 | @SerializedName("day_budget_schedule")
12 | private Long dayBudgetSchedule;
13 |
14 | public AdvertiserBudgetGetResponseStruct dayBudget(Long dayBudget) {
15 | this.dayBudget = dayBudget;
16 | return this;
17 | }
18 |
19 | public AdvertiserBudgetGetResponseStruct dayBudgetSchedule(Long dayBudgetSchedule) {
20 | this.dayBudgetSchedule = dayBudgetSchedule;
21 | return this;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/advertiser/AdvertiserFundGetRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.advertiser;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 | import com.hyq0719.mktapi.kuaishou.bean.TokenKey;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdvertiserFundGetRequest implements TokenKey {
9 |
10 | @SerializedName("advertiser_id")
11 | private Long advertiserId;
12 |
13 | public AdvertiserFundGetRequest advertiserId(Long advertiserId) {
14 | this.advertiserId = advertiserId;
15 | return this;
16 | }
17 |
18 | @Override
19 | public String getTokenKey() {
20 | return String.valueOf(advertiserId);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/advertiser/AdvertiserFundGetResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.advertiser;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdvertiserFundGetResponseStruct {
9 | @SerializedName("balance")
10 | private Double balance = null;
11 |
12 |
13 | public AdvertiserFundGetResponseStruct balance(Double balance) {
14 | this.balance = balance;
15 | return this;
16 | }
17 |
18 | @Override
19 | public String toString() {
20 | Gson gson = new Gson();
21 | return gson.toJson(this);
22 | }
23 |
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/advertiser/AdvertiserInfoRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.advertiser;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 | import com.hyq0719.mktapi.kuaishou.bean.TokenKey;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdvertiserInfoRequest implements TokenKey {
9 |
10 | @SerializedName("advertiser_id")
11 | private Long advertiserId;
12 |
13 | public AdvertiserInfoRequest advertiserId(Long advertiserId) {
14 | this.advertiserId = advertiserId;
15 | return this;
16 | }
17 |
18 | @Override
19 | public String getTokenKey() {
20 | return String.valueOf(advertiserId);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/campaign/CampaignCreateResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.campaign;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class CampaignCreateResponseStruct {
9 | @SerializedName("campaign_id")
10 | private Long campaignId = null;
11 |
12 | public CampaignCreateResponseStruct campaignId(Long campaignId) {
13 | this.campaignId = campaignId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/campaign/CampaignUpdateResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.campaign;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class CampaignUpdateResponseStruct {
9 | @SerializedName("campaign_id")
10 | private Long campaignId = null;
11 |
12 | public CampaignUpdateResponseStruct campaignId(Long campaignId) {
13 | this.campaignId = campaignId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/campaign/CampaignUpdateStatusResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.campaign;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class CampaignUpdateStatusResponseStruct {
11 | @SerializedName("campaign_ids")
12 | private List campaignIds = null;
13 |
14 | public CampaignUpdateStatusResponseStruct campaignIds(List campaignIds) {
15 | this.campaignIds = campaignIds;
16 | return this;
17 | }
18 |
19 | @Override
20 | public String toString() {
21 | Gson gson = new Gson();
22 | return gson.toJson(this);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/common/PageResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.common;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * 分页配置信息
11 | */
12 | @Data
13 | public class PageResponseData {
14 | @SerializedName("total_count")
15 | private Long totalCount = null;
16 |
17 | private List details = null;
18 |
19 | public PageResponseData page(Long totalCount) {
20 | this.totalCount = totalCount;
21 | return this;
22 | }
23 |
24 | public PageResponseData details(List details) {
25 | this.details = details;
26 | return this;
27 | }
28 |
29 | @Override
30 | public String toString() {
31 | Gson gson = new Gson();
32 | return gson.toJson(this);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/creative/AdcreativesAdvancedProgramAddResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdcreativesAdvancedProgramAddResponseStruct {
9 |
10 | @SerializedName("unit_id")
11 | private Long unitId = null;
12 |
13 | public AdcreativesAdvancedProgramAddResponseStruct unitId(Long unitId) {
14 | this.unitId = unitId;
15 | return this;
16 | }
17 |
18 | @Override
19 | public String toString() {
20 | Gson gson = new Gson();
21 | return gson.toJson(this);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/creative/CreativeAdvancedProgramReviewDetailRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import com.hyq0719.mktapi.kuaishou.bean.TokenKey;
6 | import lombok.Data;
7 |
8 | import java.util.List;
9 |
10 | @Data
11 | public class CreativeAdvancedProgramReviewDetailRequest implements TokenKey {
12 | @SerializedName("advertiser_id")
13 | private Long advertiserId = null;
14 |
15 | @SerializedName("unit_ids")
16 | private List unitIds = null;
17 |
18 | public CreativeAdvancedProgramReviewDetailRequest advertiserId(Long advertiserId) {
19 | this.advertiserId = advertiserId;
20 | return this;
21 | }
22 |
23 | public CreativeAdvancedProgramReviewDetailRequest unitIds(List unitIds) {
24 | this.unitIds = unitIds;
25 | return this;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | Gson gson = new Gson();
31 | return gson.toJson(this);
32 | }
33 |
34 | @Override
35 | public String getTokenKey() {
36 | return String.valueOf(advertiserId);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/creative/CreativeBatchUpdateResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class CreativeBatchUpdateResponseStruct {
11 | @SerializedName("update_creative_ids")
12 | private List updateCreativeIds = null;
13 |
14 | @SerializedName("add_creative_ids")
15 | private List addCreativeIds = null;
16 |
17 | public CreativeBatchUpdateResponseStruct updateCreativeIds(List updateCreativeIds) {
18 | this.updateCreativeIds = updateCreativeIds;
19 | return this;
20 | }
21 |
22 | public CreativeBatchUpdateResponseStruct addCreativeIds(List addCreativeIds) {
23 | this.addCreativeIds = addCreativeIds;
24 | return this;
25 | }
26 |
27 | @Override
28 | public String toString() {
29 | Gson gson = new Gson();
30 | return gson.toJson(this);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/creative/CreativeCreateCreativeTagAdviseRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import com.hyq0719.mktapi.kuaishou.bean.TokenKey;
6 | import lombok.Data;
7 |
8 | @Data
9 | public class CreativeCreateCreativeTagAdviseRequest implements TokenKey {
10 | @SerializedName("advertiser_id")
11 | private Long advertiserId = null;
12 |
13 | public CreativeCreateCreativeTagAdviseRequest advertiserId(Long advertiserId) {
14 | this.advertiserId = advertiserId;
15 | return this;
16 | }
17 |
18 | @Override
19 | public String toString() {
20 | Gson gson = new Gson();
21 | return gson.toJson(this);
22 | }
23 |
24 | @Override
25 | public String getTokenKey() {
26 | return String.valueOf(advertiserId);
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/creative/CreativeCreateCreativeTagAdviseResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class CreativeCreateCreativeTagAdviseResponseStruct {
11 | @SerializedName("industry")
12 | private String industry = null;
13 |
14 | @SerializedName("secondIndustry")
15 | private String secondindustry = null;
16 |
17 | @SerializedName("tags")
18 | private List tags = null;
19 |
20 |
21 | public CreativeCreateCreativeTagAdviseResponseStruct industry(String industry) {
22 | this.industry = industry;
23 | return this;
24 | }
25 |
26 | public CreativeCreateCreativeTagAdviseResponseStruct secondindustry(String secondindustry) {
27 | this.secondindustry = secondindustry;
28 | return this;
29 | }
30 |
31 | public CreativeCreateCreativeTagAdviseResponseStruct tags(List tags) {
32 | this.tags = tags;
33 | return this;
34 | }
35 |
36 | @Override
37 | public String toString() {
38 | Gson gson = new Gson();
39 | return gson.toJson(this);
40 | }
41 |
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/creative/CreativeCreateResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class CreativeCreateResponseStruct {
9 | @SerializedName("creative_id")
10 | private Long creativeId = null;
11 |
12 | public CreativeCreateResponseStruct creativeId(Long creativeId) {
13 | this.creativeId = creativeId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/creative/CreativeUpdateResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class CreativeUpdateResponseStruct {
9 | @SerializedName("creative_id")
10 | private Long creativeId = null;
11 |
12 | public CreativeUpdateResponseStruct creativeId(Long creativeId) {
13 | this.creativeId = creativeId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/creative/CreativeUpdateStatusResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class CreativeUpdateStatusResponseStruct {
11 | @SerializedName("creative_ids")
12 | private List creativeIds = null;
13 |
14 | public CreativeUpdateStatusResponseStruct creativeIds(List creativeId) {
15 | this.creativeIds = creativeId;
16 | return this;
17 | }
18 |
19 | @Override
20 | public String toString() {
21 | Gson gson = new Gson();
22 | return gson.toJson(this);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/creative/DisplayInfoStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class DisplayInfoStruct {
9 | @SerializedName("action_bar_text")
10 | private String actionBarText = null;
11 |
12 | @SerializedName("description")
13 | private String description = null;
14 |
15 |
16 | public DisplayInfoStruct actionBarText(String actionBarText) {
17 | this.actionBarText = actionBarText;
18 | return this;
19 | }
20 |
21 | public DisplayInfoStruct description(String description) {
22 | this.description = description;
23 | return this;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | Gson gson = new Gson();
29 | return gson.toJson(this);
30 | }
31 |
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/creative/PhotoListStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class PhotoListStruct {
9 | @SerializedName("creative_material_type")
10 | private Long creativeMaterialType = null;
11 |
12 | @SerializedName("photo_id")
13 | private Long photoId = null;
14 |
15 | @SerializedName("cover_image_token")
16 | private String coverImageToken = null;
17 |
18 |
19 | public PhotoListStruct creativeMaterialType(Long creativeMaterialType) {
20 | this.creativeMaterialType = creativeMaterialType;
21 | return this;
22 | }
23 |
24 | public PhotoListStruct photoId(Long photoId) {
25 | this.photoId = photoId;
26 | return this;
27 | }
28 |
29 | public PhotoListStruct coverImageToken(String coverImageToken) {
30 | this.coverImageToken = coverImageToken;
31 | return this;
32 | }
33 |
34 | @Override
35 | public String toString() {
36 | Gson gson = new Gson();
37 | return gson.toJson(this);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/tool/ContentLogStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.tool;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class ContentLogStruct {
9 | @SerializedName("original_data")
10 | private String originalData = null;
11 |
12 | @SerializedName("update_data")
13 | private String updateData = null;
14 |
15 | @SerializedName("field_name")
16 | private String fieldName = null;
17 |
18 |
19 | public ContentLogStruct originalData(String originalData) {
20 | this.originalData = originalData;
21 | return this;
22 | }
23 |
24 | public ContentLogStruct updateData(String updateData) {
25 | this.updateData = updateData;
26 | return this;
27 | }
28 |
29 | public ContentLogStruct fieldName(String fieldName) {
30 | this.fieldName = fieldName;
31 | return this;
32 | }
33 |
34 | @Override
35 | public String toString() {
36 | Gson gson = new Gson();
37 | return gson.toJson(this);
38 | }
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/bean/tool/ToolAudiencePredictionResponseStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.bean.tool;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class ToolAudiencePredictionResponseStruct {
9 | @SerializedName("audiencePredictionNum")
10 | private Long audiencePredictionNum = null;
11 |
12 | public ToolAudiencePredictionResponseStruct audiencePredictionNum(Long audiencePredictionNum) {
13 | this.audiencePredictionNum = audiencePredictionNum;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/service/KshSdkService.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.service;
2 |
3 | import com.hyq0719.mktapi.common.ApiClient;
4 | import com.hyq0719.mktapi.common.RetryStrategy;
5 | import com.hyq0719.mktapi.kuaishou.api.AccountServiceApi;
6 | import com.hyq0719.mktapi.kuaishou.api.AdServingApi;
7 | import com.hyq0719.mktapi.kuaishou.api.DataReportApi;
8 | import lombok.Getter;
9 |
10 | @Getter
11 | public class KshSdkService {
12 | private final AccountServiceApi accountServiceApi;
13 | private final AdServingApi adServingApi;
14 | private final DataReportApi dataReportApi;
15 |
16 | public KshSdkService(ApiClient apiClient, RetryStrategy retryStrategy) {
17 | accountServiceApi = new AccountServiceApi(apiClient, retryStrategy);
18 | adServingApi = new AdServingApi(apiClient, retryStrategy);
19 | dataReportApi = new DataReportApi(apiClient, retryStrategy);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/marketing-api-kuaishou/src/main/java/com/hyq0719/mktapi/kuaishou/token/KshExternalTokenService.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.kuaishou.token;
2 |
3 | import com.hyq0719.mktapi.common.token.ExternalTokenService;
4 |
5 | public abstract class KshExternalTokenService implements ExternalTokenService {
6 | }
7 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 |
8 | io.github.hyq0719
9 | marketing-api-sdk
10 | 1.0.0-beta.2
11 |
12 |
13 | marketing-api-oceanengine
14 | 1.0.0-beta.2
15 | Marketing API - Ocean Engine Java SDK
16 | 巨量引擎开放平台 Java SDK
17 |
18 |
19 | ${java.version}
20 | ${java.version}
21 |
22 |
23 |
24 |
25 | io.github.hyq0719
26 | marketing-api-common
27 | ${common.version}
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/OceanApiClient.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine;
2 |
3 | import com.hyq0719.mktapi.common.ApiClient;
4 | import com.hyq0719.mktapi.common.executor.http.HttpHandler;
5 | import com.hyq0719.mktapi.common.token.ExternalTokenService;
6 | import com.hyq0719.mktapi.common.token.cache.ITokenLocalCache;
7 |
8 | public class OceanApiClient extends ApiClient {
9 |
10 | public OceanApiClient(ITokenLocalCache iTokenLocalCache, HttpHandler httpsClient,
11 | ExternalTokenService externalTokenService) {
12 | super(iTokenLocalCache, httpsClient, externalTokenService);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/OceanDefaultFields.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | public class OceanDefaultFields {
7 | /**
8 | * 广告组全部字段
9 | */
10 | public final static List BASE_CAMPAIGN_GET_FIEDS = Arrays.asList("id", "name", "budget", "budget_mode",
11 | "landing_type", "status", "modify_time", "status", "modify_time", "campaign_modify_time",
12 | "campaign_create_time");
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/OceanRetryStrategy.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine;
2 |
3 | import com.hyq0719.mktapi.common.RetryStrategy;
4 |
5 |
6 | public class OceanRetryStrategy implements RetryStrategy {
7 |
8 | private Integer retryCount = 3;
9 |
10 | private Boolean enable = true;
11 |
12 | public void setRetryCount(Integer retryCount) {
13 | if (retryCount == null) {
14 | return;
15 | }
16 | this.retryCount = retryCount;
17 | }
18 |
19 | public void setEnable(Boolean enable) {
20 | if (enable == null) {
21 | return;
22 | }
23 | this.enable = enable;
24 | }
25 |
26 | @Override
27 | public Integer retryCount() {
28 | return retryCount;
29 | }
30 |
31 | @Override
32 | public Boolean retryCondition(Long code) {
33 | return code == 40100 || code == 50000;
34 | }
35 |
36 | @Override
37 | public Boolean enable() {
38 | return enable;
39 | }
40 |
41 | @Override
42 | public Boolean isTokenExpired(Long code) {
43 | return code == 40105 || code == 40102;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/CodeKey.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean;
2 |
3 | public interface CodeKey {
4 | Long getCodeKey();
5 |
6 | String getMsg();
7 | }
8 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/IPage.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean;
2 |
3 | public interface IPage extends TokenKey {
4 | void exchangeCurrentPage(Integer page);
5 |
6 | Integer currentPageSize();
7 | }
8 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/TokenKey.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean;
2 |
3 | public interface TokenKey {
4 | String getTokenKey();
5 | }
6 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdCostProtectStatusGetRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import com.hyq0719.mktapi.oceanengine.bean.TokenKey;
6 | import lombok.Data;
7 |
8 | import java.util.List;
9 |
10 | @Data
11 | public class AdCostProtectStatusGetRequest implements TokenKey {
12 | @SerializedName("advertiser_id")
13 | private Long advertiserId = null;
14 |
15 | @SerializedName("ad_ids")
16 | private List adIds = null;
17 |
18 | public AdCostProtectStatusGetRequest advertiserId(Long advertiserId) {
19 | this.advertiserId = advertiserId;
20 | return this;
21 | }
22 |
23 | public AdCostProtectStatusGetRequest adIds(List adIds) {
24 | this.adIds = adIds;
25 | return this;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | Gson gson = new Gson();
31 | return gson.toJson(this);
32 | }
33 |
34 | @Override
35 | public String getTokenKey() {
36 | return String.valueOf(advertiserId);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdCostProtectStatusGetResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class AdCostProtectStatusGetResponseData {
11 | @SerializedName("list")
12 | private List list = null;
13 |
14 | public AdCostProtectStatusGetResponseData list(List list) {
15 | this.list = list;
16 | return this;
17 | }
18 |
19 | @Override
20 | public String toString() {
21 | Gson gson = new Gson();
22 | return gson.toJson(this);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdCreateResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdCreateResponseData {
9 | @SerializedName("ad_id")
10 | private Long adId = null;
11 |
12 | public AdCreateResponseData adId(Long adId) {
13 | this.adId = adId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdRejectReasonRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import com.hyq0719.mktapi.oceanengine.bean.TokenKey;
6 | import lombok.Data;
7 |
8 | import java.util.List;
9 |
10 | @Data
11 | public class AdRejectReasonRequest implements TokenKey {
12 | @SerializedName("advertiser_id")
13 | private Long advertiserId = null;
14 |
15 | @SerializedName("ad_ids")
16 | private List adIds = null;
17 |
18 | public AdRejectReasonRequest advertiserId(Long advertiserId) {
19 | this.advertiserId = advertiserId;
20 | return this;
21 | }
22 |
23 | public AdRejectReasonRequest adIds(List adIds) {
24 | this.adIds = adIds;
25 | return this;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | Gson gson = new Gson();
31 | return gson.toJson(this);
32 | }
33 |
34 | @Override
35 | public String getTokenKey() {
36 | return String.valueOf(advertiserId);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdRejectReasonResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class AdRejectReasonResponseData {
11 | @SerializedName("list")
12 | private List list = null;
13 |
14 | public AdRejectReasonResponseData list(List list) {
15 | this.list = list;
16 | return this;
17 | }
18 |
19 | @Override
20 | public String toString() {
21 | Gson gson = new Gson();
22 | return gson.toJson(this);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdRejectReasonResponseListStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class AdRejectReasonResponseListStruct {
11 | @SerializedName("ad_reject")
12 | private AdRejectStruct adReject = null;
13 |
14 | @SerializedName("creative_reject")
15 | private List creativeReject = null;
16 |
17 | @SerializedName("material_reject")
18 | private List materialReject = null;
19 |
20 | public AdRejectReasonResponseListStruct adReject(AdRejectStruct adReject) {
21 | this.adReject = adReject;
22 | return this;
23 | }
24 |
25 | public AdRejectReasonResponseListStruct creativeReject(List creativeReject) {
26 | this.creativeReject = creativeReject;
27 | return this;
28 | }
29 |
30 | public AdRejectReasonResponseListStruct materialReject(List materialReject) {
31 | this.materialReject = materialReject;
32 | return this;
33 | }
34 |
35 | @Override
36 | public String toString() {
37 | Gson gson = new Gson();
38 | return gson.toJson(this);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdRejectStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class AdRejectStruct {
11 | @SerializedName("ad_id")
12 | private Long adId = null;
13 |
14 | @SerializedName("reject_data")
15 | private List rejectData = null;
16 |
17 | public AdRejectStruct adId(Long adId) {
18 | this.adId = adId;
19 | return this;
20 | }
21 |
22 | public AdRejectStruct rejectData(List rejectData) {
23 | this.rejectData = rejectData;
24 | return this;
25 | }
26 |
27 | @Override
28 | public String toString() {
29 | Gson gson = new Gson();
30 | return gson.toJson(this);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdUpdateBidRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import com.hyq0719.mktapi.oceanengine.bean.TokenKey;
6 | import lombok.Data;
7 |
8 | import java.util.List;
9 |
10 | @Data
11 | public class AdUpdateBidRequest implements TokenKey {
12 | @SerializedName("advertiser_id")
13 | private Long advertiserId = null;
14 |
15 | @SerializedName("data")
16 | private List data = null;
17 |
18 | public AdUpdateBidRequest advertiserId(Long advertiserId) {
19 | this.advertiserId = advertiserId;
20 | return this;
21 | }
22 |
23 | public AdUpdateBidRequest data(List data) {
24 | this.data = data;
25 | return this;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | Gson gson = new Gson();
31 | return gson.toJson(this);
32 | }
33 |
34 | @Override
35 | public String getTokenKey() {
36 | return String.valueOf(advertiserId);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdUpdateBidRequestData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdUpdateBidRequestData {
9 | @SerializedName("ad_id")
10 | private Long adId = null;
11 |
12 | @SerializedName("bid")
13 | private Long bid = null;
14 |
15 | public AdUpdateBidRequestData adIds(Long adId) {
16 | this.adId = adId;
17 | return this;
18 | }
19 |
20 | public AdUpdateBidRequestData bid(Long bid) {
21 | this.bid = bid;
22 | return this;
23 | }
24 |
25 | @Override
26 | public String toString() {
27 | Gson gson = new Gson();
28 | return gson.toJson(this);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdUpdateBidResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class AdUpdateBidResponseData {
11 | @SerializedName("ad_ids")
12 | private List adIds = null;
13 |
14 | @SerializedName("errors")
15 | private List errors = null;
16 |
17 | public AdUpdateBidResponseData adIds(List adIds) {
18 | this.adIds = adIds;
19 | return this;
20 | }
21 |
22 | public AdUpdateBidResponseData errors(List errors) {
23 | this.errors = errors;
24 | return this;
25 | }
26 |
27 | @Override
28 | public String toString() {
29 | Gson gson = new Gson();
30 | return gson.toJson(this);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdUpdateBudgetRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import com.hyq0719.mktapi.oceanengine.bean.TokenKey;
6 | import lombok.Data;
7 |
8 | @Data
9 | public class AdUpdateBudgetRequest implements TokenKey {
10 | @SerializedName("advertiser_id")
11 | private Long advertiserId = null;
12 |
13 | @SerializedName("data")
14 | private AdUpdateBudgetRequestData data = null;
15 |
16 | public AdUpdateBudgetRequest advertiserId(Long advertiserId) {
17 | this.advertiserId = advertiserId;
18 | return this;
19 | }
20 |
21 | public AdUpdateBudgetRequest data(AdUpdateBudgetRequestData data) {
22 | this.data = data;
23 | return this;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | Gson gson = new Gson();
29 | return gson.toJson(this);
30 | }
31 |
32 | @Override
33 | public String getTokenKey() {
34 | return String.valueOf(advertiserId);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdUpdateBudgetRequestData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdUpdateBudgetRequestData {
9 | @SerializedName("ad_id")
10 | private Long adId = null;
11 |
12 | @SerializedName("budget")
13 | private Long budget = null;
14 |
15 | public AdUpdateBudgetRequestData adId(Long adId) {
16 | this.adId = adId;
17 | return this;
18 | }
19 |
20 | public AdUpdateBudgetRequestData budget(Long budget) {
21 | this.budget = budget;
22 | return this;
23 | }
24 |
25 | @Override
26 | public String toString() {
27 | Gson gson = new Gson();
28 | return gson.toJson(this);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdUpdateBudgetResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class AdUpdateBudgetResponseData {
11 | @SerializedName("ad_ids")
12 | private List adIds = null;
13 | @SerializedName("errors")
14 | private List errors = null;
15 |
16 | public AdUpdateBudgetResponseData adIds(List adIds) {
17 | this.adIds = adIds;
18 | return this;
19 | }
20 |
21 | public AdUpdateBudgetResponseData errors(List errors) {
22 | this.errors = errors;
23 | return this;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | Gson gson = new Gson();
29 | return gson.toJson(this);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdUpdateResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdUpdateResponseData {
9 | @SerializedName("ad_id")
10 | private Long adId = null;
11 |
12 | @SerializedName("need_audit")
13 | private Long needAudit = null;
14 |
15 | public AdUpdateResponseData adId(Long adId) {
16 | this.adId = adId;
17 | return this;
18 | }
19 |
20 | public AdUpdateResponseData needAudit(Long needAudit) {
21 | this.needAudit = needAudit;
22 | return this;
23 | }
24 |
25 | @Override
26 | public String toString() {
27 | Gson gson = new Gson();
28 | return gson.toJson(this);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdUpdateStatusRequest.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 | import com.hyq0719.mktapi.oceanengine.bean.TokenKey;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class AdUpdateStatusRequest implements TokenKey {
11 | @SerializedName("advertiser_id")
12 | private Long advertiserId = null;
13 |
14 | @SerializedName("ad_ids")
15 | private List adIds = null;
16 |
17 | @SerializedName("opt_status")
18 | private String optStatus = null;
19 |
20 | public AdUpdateStatusRequest advertiserId(Long advertiserId) {
21 | this.advertiserId = advertiserId;
22 | return this;
23 | }
24 |
25 | public AdUpdateStatusRequest adIds(List adIds) {
26 | this.adIds = adIds;
27 | return this;
28 | }
29 |
30 | public AdUpdateStatusRequest optStatus(String optStatus) {
31 | this.optStatus = optStatus;
32 | return this;
33 | }
34 |
35 | @Override
36 | public String getTokenKey() {
37 | return String.valueOf(advertiserId);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdUpdateStatusResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class AdUpdateStatusResponseData {
11 | @SerializedName("ad_ids")
12 | private List adIds = null;
13 | @SerializedName("errors")
14 | private List errorStructs = null;
15 |
16 | public AdUpdateStatusResponseData adIds(List adIds) {
17 | this.adIds = adIds;
18 | return this;
19 | }
20 |
21 | public AdUpdateStatusResponseData errors(List errorStructs) {
22 | this.errorStructs = errorStructs;
23 | return this;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | Gson gson = new Gson();
29 | return gson.toJson(this);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/AdsGetCostProtectStatusResponseListStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class AdsGetCostProtectStatusResponseListStruct {
9 | @SerializedName("status")
10 | private String status = null;
11 |
12 | @SerializedName("ad_id")
13 | private Long adId = null;
14 |
15 | public AdsGetCostProtectStatusResponseListStruct adId(Long adId) {
16 | this.adId = adId;
17 | return this;
18 | }
19 |
20 | public AdsGetCostProtectStatusResponseListStruct status(String status) {
21 | this.status = status;
22 | return this;
23 | }
24 |
25 | @Override
26 | public String toString() {
27 | Gson gson = new Gson();
28 | return gson.toJson(this);
29 | }
30 |
31 | /**
32 | * Convert the given object to string with each line indented by 4 spaces (except the first line).
33 | */
34 | private String toIndentedString(Object o) {
35 | if (o == null) {
36 | return "null";
37 | }
38 | return o.toString().replace("\n", "\n ");
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/CreativeRejectStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class CreativeRejectStruct {
11 | @SerializedName("creative_id")
12 | private Long creativeId = null;
13 |
14 | @SerializedName("reject_data")
15 | private List rejectData = null;
16 |
17 | @SerializedName("material_reject")
18 | private List materialReject = null;
19 |
20 | public CreativeRejectStruct creativeId(Long creativeId) {
21 | this.creativeId = creativeId;
22 | return this;
23 | }
24 |
25 | public CreativeRejectStruct rejectData(List rejectData) {
26 | this.rejectData = rejectData;
27 | return this;
28 | }
29 |
30 | public CreativeRejectStruct materialReject(List materialReject) {
31 | this.materialReject = materialReject;
32 | return this;
33 | }
34 |
35 | @Override
36 | public String toString() {
37 | Gson gson = new Gson();
38 | return gson.toJson(this);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/DpaProductTargetStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class DpaProductTargetStruct {
9 | @SerializedName("rule")
10 | private String rule = null;
11 |
12 | @SerializedName("title")
13 | private String title = null;
14 |
15 | @SerializedName("type")
16 | private String type = null;
17 |
18 | @SerializedName("value")
19 | private String value = null;
20 |
21 |
22 | public DpaProductTargetStruct rule(String rule) {
23 | this.rule = rule;
24 | return this;
25 | }
26 |
27 | public DpaProductTargetStruct title(String title) {
28 | this.title = title;
29 | return this;
30 | }
31 |
32 | public DpaProductTargetStruct type(String type) {
33 | this.type = type;
34 | return this;
35 | }
36 |
37 | public DpaProductTargetStruct value(String value) {
38 | this.value = value;
39 | return this;
40 | }
41 |
42 | @Override
43 | public String toString() {
44 | Gson gson = new Gson();
45 | return gson.toJson(this);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/MaterialRejectStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class MaterialRejectStruct {
11 | @SerializedName("title")
12 | private String title = null;
13 |
14 | @SerializedName("image_id")
15 | private List imageId = null;
16 |
17 | @SerializedName("video_id")
18 | private String videoId = null;
19 |
20 | @SerializedName("reject_reason")
21 | private String rejectReason = null;
22 |
23 | public MaterialRejectStruct title(String title) {
24 | this.title = title;
25 | return this;
26 | }
27 |
28 | public MaterialRejectStruct imageId(List imageId) {
29 | this.imageId = imageId;
30 | return this;
31 | }
32 |
33 | public MaterialRejectStruct videoId(String videoId) {
34 | this.videoId = videoId;
35 | return this;
36 | }
37 |
38 | public MaterialRejectStruct rejectReason(String rejectReason) {
39 | this.rejectReason = rejectReason;
40 | return this;
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | Gson gson = new Gson();
46 | return gson.toJson(this);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/ad/RejectDataStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.ad;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class RejectDataStruct {
9 | @SerializedName("reject_item")
10 | private String rejectItem = null;
11 |
12 | @SerializedName("reject_reason")
13 | private String rejectReason = null;
14 |
15 | public RejectDataStruct rejectItem(String rejectItem) {
16 | this.rejectItem = rejectItem;
17 | return this;
18 | }
19 |
20 | public RejectDataStruct rejectReason(String rejectReason) {
21 | this.rejectReason = rejectReason;
22 | return this;
23 | }
24 |
25 | @Override
26 | public String toString() {
27 | Gson gson = new Gson();
28 | return gson.toJson(this);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/advertiser/MajordomoAdvertiserSelectStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.advertiser;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class MajordomoAdvertiserSelectStruct {
9 |
10 | @SerializedName("advertiser_id")
11 | private Long advertiserId;
12 |
13 | @SerializedName("advertiser_name")
14 | private String advertiserName;
15 |
16 | public MajordomoAdvertiserSelectStruct advertiserId(Long advertiserId) {
17 | this.advertiserId = advertiserId;
18 | return this;
19 | }
20 |
21 | public MajordomoAdvertiserSelectStruct advertiserName(String advertiserName) {
22 | this.advertiserName = advertiserName;
23 | return this;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | Gson gson = new Gson();
29 | return gson.toJson(this);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/campaign/CampaignCreateResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.campaign;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class CampaignCreateResponseData {
9 | @SerializedName("campaign_id")
10 | private Long campaignId = null;
11 |
12 | public CampaignCreateResponseData campaignId(Long campaignId) {
13 | this.campaignId = campaignId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/campaign/CampaignUpdateResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.campaign;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class CampaignUpdateResponseData {
9 | @SerializedName("campaign_id")
10 | private Long campaignId = null;
11 |
12 | public CampaignUpdateResponseData campaignId(Long campaignId) {
13 | this.campaignId = campaignId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/campaign/CampaignUpdateStatusResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.campaign;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class CampaignUpdateStatusResponseData {
11 | @SerializedName("campaign_ids")
12 | private List campaignIds = null;
13 | @SerializedName("errors")
14 | private List errors = null;
15 |
16 | public CampaignUpdateStatusResponseData campaignIds(List campaignIds) {
17 | this.campaignIds = campaignIds;
18 | return this;
19 | }
20 |
21 | public CampaignUpdateStatusResponseData errors(List errors) {
22 | this.errors = errors;
23 | return this;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | Gson gson = new Gson();
29 | return gson.toJson(this);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/common/PageResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.common;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 | import lombok.Data;
5 |
6 | import java.util.List;
7 |
8 | @Data
9 | public class PageResponseData {
10 | @SerializedName("list")
11 | private List list = null;
12 |
13 | @SerializedName("page_info")
14 | private PageInfo pageInfo = null;
15 |
16 | public PageResponseData list(List list) {
17 | this.list = list;
18 | return this;
19 | }
20 |
21 | public PageResponseData pageInfo(PageInfo pageInfo) {
22 | this.pageInfo = pageInfo;
23 | return this;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/AbstractMaterialsStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class AbstractMaterialsStruct {
11 | @SerializedName("text_abstract_info")
12 | private TextAbstractInfoStruct textAbstractInfo = null;
13 |
14 | @SerializedName("struct_abstract_info")
15 | private List structAbstractInfo = null;
16 |
17 | public AbstractMaterialsStruct textAbstractInfo(TextAbstractInfoStruct textAbstractInfo) {
18 | this.textAbstractInfo = textAbstractInfo;
19 | return this;
20 | }
21 |
22 | public AbstractMaterialsStruct structAbstractInfo(List structAbstractInfo) {
23 | this.structAbstractInfo = structAbstractInfo;
24 | return this;
25 | }
26 |
27 | @Override
28 | public String toString() {
29 | Gson gson = new Gson();
30 | return gson.toJson(this);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/BidWordListStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class BidWordListStruct {
9 | @SerializedName("default_word")
10 | private String defaultWord = null;
11 |
12 | public BidWordListStruct defaultWord(String defaultWord) {
13 | this.defaultWord = defaultWord;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/ComponentMaterialsStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class ComponentMaterialsStruct {
9 | @SerializedName("component_id")
10 | private Long componentId = null;
11 |
12 | public ComponentMaterialsStruct componentId(Long componentId) {
13 | this.componentId = componentId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/CreativeCustomCreativeCreateResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class CreativeCustomCreativeCreateResponseData {
11 | @SerializedName("creative_ids")
12 | private List creativeIds = null;
13 | @SerializedName("errors")
14 | private List errors = null;
15 |
16 |
17 | public CreativeCustomCreativeCreateResponseData creativeIds(List creativeIds) {
18 | this.creativeIds = creativeIds;
19 | return this;
20 | }
21 |
22 | public CreativeCustomCreativeCreateResponseData errors(List errors) {
23 | this.errors = errors;
24 | return this;
25 | }
26 |
27 | @Override
28 | public String toString() {
29 | Gson gson = new Gson();
30 | return gson.toJson(this);
31 | }
32 |
33 | /**
34 | * Convert the given object to string with each line indented by 4 spaces (except the first line).
35 | */
36 | private String toIndentedString(Object o) {
37 | if (o == null) {
38 | return "null";
39 | }
40 | return o.toString().replace("\n", "\n ");
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/CreativeCustomCreativeUpdateResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class CreativeCustomCreativeUpdateResponseData {
11 | @SerializedName("creative_ids")
12 | private List creativeIds = null;
13 | @SerializedName("errors")
14 | private List errors = null;
15 |
16 |
17 | public CreativeCustomCreativeUpdateResponseData creativeIds(List creativeIds) {
18 | this.creativeIds = creativeIds;
19 | return this;
20 | }
21 |
22 | public CreativeCustomCreativeUpdateResponseData errors(List errors) {
23 | this.errors = errors;
24 | return this;
25 | }
26 |
27 | @Override
28 | public String toString() {
29 | Gson gson = new Gson();
30 | return gson.toJson(this);
31 | }
32 |
33 | /**
34 | * Convert the given object to string with each line indented by 4 spaces (except the first line).
35 | */
36 | private String toIndentedString(Object o) {
37 | if (o == null) {
38 | return "null";
39 | }
40 | return o.toString().replace("\n", "\n ");
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/DpaWordListStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class DpaWordListStruct {
9 | @SerializedName("word_id")
10 | private Long wordId = null;
11 |
12 | public DpaWordListStruct wordId(Long wordId) {
13 | this.wordId = wordId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/ImageInfoStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class ImageInfoStruct {
9 | @SerializedName("image_id")
10 | private String imageId = null;
11 |
12 | @SerializedName("name")
13 | private String name = null;
14 |
15 | public ImageInfoStruct imageId(String imageId) {
16 | this.imageId = imageId;
17 | return this;
18 | }
19 |
20 | public ImageInfoStruct name(String name) {
21 | this.name = name;
22 | return this;
23 | }
24 |
25 | @Override
26 | public String toString() {
27 | Gson gson = new Gson();
28 | return gson.toJson(this);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/ImageMaterialsStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class ImageMaterialsStruct {
9 | @SerializedName("image_info")
10 | private ImageInfoStruct imageInfo = null;
11 | @SerializedName("template_image")
12 | private TemplateImageStruct templateImageStruct = null;
13 |
14 | public ImageMaterialsStruct imageInfo(ImageInfoStruct imageInfo) {
15 | this.imageInfo = imageInfo;
16 | return this;
17 | }
18 |
19 | public ImageMaterialsStruct templateImageStruct(TemplateImageStruct templateImageStruct) {
20 | this.templateImageStruct = templateImageStruct;
21 | return this;
22 | }
23 |
24 | @Override
25 | public String toString() {
26 | Gson gson = new Gson();
27 | return gson.toJson(this);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/PlayableInfoStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class PlayableInfoStruct {
9 | @SerializedName("playable_url")
10 | private String playableUrl = null;
11 |
12 | public PlayableInfoStruct playableUrl(String playableUrl) {
13 | this.playableUrl = playableUrl;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/PlayableMaterialStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class PlayableMaterialStruct {
9 | @SerializedName("playable_info")
10 | private PlayableInfoStruct playableInfo = null;
11 |
12 | public PlayableMaterialStruct playableInfo(PlayableInfoStruct playableInfo) {
13 | this.playableInfo = playableInfo;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/StructAbstractInfoStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class StructAbstractInfoStruct {
9 | @SerializedName("abstract_label")
10 | private String abstractLabel = null;
11 |
12 | @SerializedName("abstract_text")
13 | private String abstractText = null;
14 |
15 | public StructAbstractInfoStruct abstractLabel(String abstractLabel) {
16 | this.abstractLabel = abstractLabel;
17 | return this;
18 | }
19 |
20 | public StructAbstractInfoStruct abstractText(String abstractText) {
21 | this.abstractText = abstractText;
22 | return this;
23 | }
24 |
25 | @Override
26 | public String toString() {
27 | Gson gson = new Gson();
28 | return gson.toJson(this);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/SubTitleMaterialStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class SubTitleMaterialStruct {
9 | @SerializedName("sub_title")
10 | private String subTitle = null;
11 |
12 | public SubTitleMaterialStruct subTitle(String subTitle) {
13 | this.subTitle = subTitle;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/TemplateDataListStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class TemplateDataListStruct {
9 | @SerializedName("background_image_id")
10 | private String backgroundImageId = null;
11 |
12 | public TemplateDataListStruct backgroundImageId(String backgroundImageId) {
13 | this.backgroundImageId = backgroundImageId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/TemplateImageStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class TemplateImageStruct {
11 | @SerializedName("template_id")
12 | private String templateId = null;
13 | @SerializedName("template_data_list")
14 | private List templateDataList = null;
15 |
16 | public TemplateImageStruct templateId(String templateId) {
17 | this.templateId = templateId;
18 | return this;
19 | }
20 |
21 | public TemplateImageStruct templateDataList(List templateDataList) {
22 | this.templateDataList = templateDataList;
23 | return this;
24 | }
25 |
26 | @Override
27 | public String toString() {
28 | Gson gson = new Gson();
29 | return gson.toJson(this);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/TextAbstractInfoStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | @Data
10 | public class TextAbstractInfoStruct {
11 | @SerializedName("abstract_text")
12 | private String abstractText = null;
13 |
14 | @SerializedName("bidword_list")
15 | private List bidWordList = null;
16 |
17 | @SerializedName("word_list")
18 | private List wordList = null;
19 |
20 | public TextAbstractInfoStruct abstractText(String abstractText) {
21 | this.abstractText = abstractText;
22 | return this;
23 | }
24 |
25 | public TextAbstractInfoStruct bidWordList(List bidWordList) {
26 | this.bidWordList = bidWordList;
27 | return this;
28 | }
29 |
30 | public TextAbstractInfoStruct wordList(List wordList) {
31 | this.wordList = wordList;
32 | return this;
33 | }
34 |
35 | @Override
36 | public String toString() {
37 | Gson gson = new Gson();
38 | return gson.toJson(this);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/VideoInfoStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class VideoInfoStruct {
9 | @SerializedName("video_id")
10 | private String videoId = null;
11 |
12 | public VideoInfoStruct videoId(String videoId) {
13 | this.videoId = videoId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/creative/WordListStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.bean.creative;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | @Data
8 | public class WordListStruct {
9 | @SerializedName("word_id")
10 | private Long wordId = null;
11 |
12 | public WordListStruct wordId(Long wordId) {
13 | this.wordId = wordId;
14 | return this;
15 | }
16 |
17 | @Override
18 | public String toString() {
19 | Gson gson = new Gson();
20 | return gson.toJson(this);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/dmp/DmpCustomAudienceDeleteResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.dmp;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-03 23:21:33
17 | */
18 | @Data
19 | public class DmpCustomAudienceDeleteResponseData {
20 | /**
21 | * 人群包id
22 | */
23 | @SerializedName("custom_audience_id")
24 | private Long customAudienceId = null;
25 |
26 | public DmpCustomAudienceDeleteResponseData customAudienceId(Long customAudienceId) {
27 | this.customAudienceId = customAudienceId;
28 | return this;
29 | }
30 |
31 | @Override
32 | public String toString() {
33 | Gson gson = new Gson();
34 | return gson.toJson(this);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/dmp/DmpCustomAudienceReadResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.dmp;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-03 21:33:23
19 | */
20 | @Data
21 | public class DmpCustomAudienceReadResponseData {
22 | /**
23 | * 人群包列表数据
24 | */
25 | @SerializedName("custom_audience_list")
26 | private List customAudienceList = null;
27 |
28 | public DmpCustomAudienceReadResponseData customAudienceList(List customAudienceList) {
29 | this.customAudienceList = customAudienceList;
30 | return this;
31 | }
32 |
33 | @Override
34 | public String toString() {
35 | Gson gson = new Gson();
36 | return gson.toJson(this);
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/dmp/DmpDataSourceCreateResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.dmp;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-03 18:56:45
17 | */
18 | @Data
19 | public class DmpDataSourceCreateResponseData {
20 | /**
21 | * 数据源id, 唯一标识数据源的字符串
22 | */
23 | @SerializedName("data_source_id")
24 | private String dataSourceId = null;
25 |
26 | public DmpDataSourceCreateResponseData dataSourceId(String dataSourceId) {
27 | this.dataSourceId = dataSourceId;
28 | return this;
29 | }
30 |
31 | @Override
32 | public String toString() {
33 | Gson gson = new Gson();
34 | return gson.toJson(this);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/dmp/DmpDataSourceFileUploadResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.dmp;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-03 18:22:47
17 | */
18 | @Data
19 | public class DmpDataSourceFileUploadResponseData {
20 | /**
21 | * 文件路径,包含作为文件唯一标识的字符串(14天后文件路径过期)
22 | */
23 | @SerializedName("file_path")
24 | private String filePath = null;
25 |
26 | public DmpDataSourceFileUploadResponseData filePath(String filePath) {
27 | this.filePath = filePath;
28 | return this;
29 | }
30 |
31 | @Override
32 | public String toString() {
33 | Gson gson = new Gson();
34 | return gson.toJson(this);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/dmp/DmpDataSourceReadResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.dmp;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-03 19:17:28
19 | */
20 | @Data
21 | public class DmpDataSourceReadResponseData {
22 | /**
23 | * 数据信息列表
24 | */
25 | @SerializedName("data_list")
26 | private List dataList = null;
27 |
28 | public DmpDataSourceReadResponseData dataList(List dataList) {
29 | this.dataList = dataList;
30 | return this;
31 | }
32 |
33 | @Override
34 | public String toString() {
35 | Gson gson = new Gson();
36 | return gson.toJson(this);
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/material/FileMaterialBindResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.material;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | @Data
16 | public class FileMaterialBindResponseData {
17 | /**
18 | * 推送失败列表
19 | */
20 | @SerializedName("fail_list")
21 | private List failList = null;
22 |
23 |
24 | public FileMaterialBindResponseData failList(List failList) {
25 | this.failList = failList;
26 | return this;
27 | }
28 |
29 |
30 | @Override
31 | public String toString() {
32 | Gson gson = new Gson();
33 | return gson.toJson(this);
34 | }
35 |
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/material/FileVideoDeleteResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.material;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | @Data
16 | public class FileVideoDeleteResponseData {
17 | /**
18 | * 操作失败的video_id列表,不在此列表内的素材表示删除成功
19 | */
20 | @SerializedName("fail_video_ids")
21 | private List failVideoIds = null;
22 |
23 |
24 | public FileVideoDeleteResponseData failVideoIds(List failVideoIds) {
25 | this.failVideoIds = failVideoIds;
26 | return this;
27 | }
28 |
29 |
30 | @Override
31 | public String toString() {
32 | Gson gson = new Gson();
33 | return gson.toJson(this);
34 | }
35 |
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/material/FileVideoUpdateResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.material;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | @Data
16 | public class FileVideoUpdateResponseData {
17 | /**
18 | * 视频列表
19 | */
20 | @SerializedName("videos")
21 | private List videos = null;
22 |
23 |
24 | public FileVideoUpdateResponseData videos(List videos) {
25 | this.videos = videos;
26 | return this;
27 | }
28 |
29 |
30 | @Override
31 | public String toString() {
32 | Gson gson = new Gson();
33 | return gson.toJson(this);
34 | }
35 |
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/material/ToolsVideoCoverSuggestRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.material;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import com.hyq0719.mktapi.oceanengine.bean.TokenKey;
12 | import lombok.Data;
13 |
14 | @Data
15 | public class ToolsVideoCoverSuggestRequest implements TokenKey {
16 | /**
17 | * 广告主ID
18 | */
19 | @SerializedName("advertiser_id")
20 | private Long advertiserId = null;
21 |
22 | /**
23 | * 视频id
24 | */
25 | @SerializedName("video_id")
26 | private String videoId = null;
27 |
28 |
29 | public ToolsVideoCoverSuggestRequest advertiserId(Long advertiserId) {
30 | this.advertiserId = advertiserId;
31 | return this;
32 | }
33 |
34 | public ToolsVideoCoverSuggestRequest videoId(String videoId) {
35 | this.videoId = videoId;
36 | return this;
37 | }
38 |
39 |
40 | @Override
41 | public String toString() {
42 | Gson gson = new Gson();
43 | return gson.toJson(this);
44 | }
45 |
46 | @Override
47 | public String getTokenKey() {
48 | return String.valueOf(advertiserId);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/material/ToolsVideoCoverSuggestResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.material;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | @Data
16 | public class ToolsVideoCoverSuggestResponseData {
17 | /**
18 | * 封面生成的状态枚举值:RUNNING(生成中)、SUCCESS(成功)、FAILED(失败)注意:视频封面不是实时生成,需要根据status字段判断封面生成的状态,大概需要6,7s中生成,所以当sta...
19 | */
20 | @SerializedName("status")
21 | private String status = null;
22 |
23 | /**
24 | * 视频封面列表
25 | */
26 | @SerializedName("list")
27 | private List list = null;
28 |
29 |
30 | public ToolsVideoCoverSuggestResponseData status(String status) {
31 | this.status = status;
32 | return this;
33 | }
34 |
35 | public ToolsVideoCoverSuggestResponseData list(List list) {
36 | this.list = list;
37 | return this;
38 | }
39 |
40 |
41 | @Override
42 | public String toString() {
43 | Gson gson = new Gson();
44 | return gson.toJson(this);
45 | }
46 |
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/material/VideosStruct.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.material;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | @Data
14 | public class VideosStruct {
15 | /**
16 | * 视频id
17 | */
18 | @SerializedName("video_id")
19 | private String videoId = null;
20 |
21 | /**
22 | * 更新状态 SUCCESS 成功 FAILURE 失败(原因:操作视频非当前广告主所有或操作的视频不存在)
23 | */
24 | @SerializedName("status_code")
25 | private String statusCode = null;
26 |
27 |
28 | public VideosStruct videoId(String videoId) {
29 | this.videoId = videoId;
30 | return this;
31 | }
32 |
33 | public VideosStruct statusCode(String statusCode) {
34 | this.statusCode = statusCode;
35 | return this;
36 | }
37 |
38 |
39 | @Override
40 | public String toString() {
41 | Gson gson = new Gson();
42 | return gson.toJson(this);
43 | }
44 |
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/token/AdvertiserGetResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.token;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-03 00:14:16
19 | */
20 | @Data
21 | public class AdvertiserGetResponseData {
22 | /**
23 | * 账号列表
24 | */
25 | @SerializedName("list")
26 | private List list = null;
27 |
28 | public AdvertiserGetResponseData list(List list) {
29 | this.list = list;
30 | return this;
31 | }
32 |
33 | @Override
34 | public String toString() {
35 | Gson gson = new Gson();
36 | return gson.toJson(this);
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/token/AppAccessTokenResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.token;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-03 10:12:58
17 | */
18 | @Data
19 | public class AppAccessTokenResponseData {
20 | /**
21 | * 应用级别token
22 | */
23 | @SerializedName("access_token")
24 | private String accessToken = null;
25 |
26 | /**
27 | * access_token剩余有效时间,单位(秒)
28 | */
29 | @SerializedName("expires_in")
30 | private Long expiresIn = null;
31 |
32 | public AppAccessTokenResponseData accessToken(String accessToken) {
33 | this.accessToken = accessToken;
34 | return this;
35 | }
36 |
37 | public AppAccessTokenResponseData expiresIn(Long expiresIn) {
38 | this.expiresIn = expiresIn;
39 | return this;
40 | }
41 |
42 | @Override
43 | public String toString() {
44 | Gson gson = new Gson();
45 | return gson.toJson(this);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/bean/token/UserInfoRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API 巨量引擎
3 | * Marketing API 巨量引擎
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.oceanengine.bean.token;
8 |
9 | import com.google.gson.Gson;
10 | import com.hyq0719.mktapi.oceanengine.bean.TokenKey;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-03 00:39:35
17 | */
18 | @Data
19 | public class UserInfoRequest implements TokenKey {
20 |
21 | @Override
22 | public String toString() {
23 | Gson gson = new Gson();
24 | return gson.toJson(this);
25 | }
26 |
27 | @Override
28 | public String getTokenKey() {
29 | return null;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/service/OceanSdkService.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.service;
2 |
3 | import com.hyq0719.mktapi.common.ApiClient;
4 | import com.hyq0719.mktapi.common.RetryStrategy;
5 | import com.hyq0719.mktapi.oceanengine.api.*;
6 | import lombok.Getter;
7 |
8 | @Getter
9 | public class OceanSdkService {
10 | private final AccountServiceApi accountServiceApi;
11 | private final AdServingApi adServingApi;
12 | private final DataReportApi dataReportApi;
13 | private final MaterialApi materialApi;
14 | private final TokenApi tokenApi;
15 | private final DmpAudienceApi dmpAudienceApi;
16 |
17 | public OceanSdkService(ApiClient apiClient, RetryStrategy retryStrategy) {
18 | accountServiceApi = new AccountServiceApi(apiClient, retryStrategy);
19 | adServingApi = new AdServingApi(apiClient, retryStrategy);
20 | dataReportApi = new DataReportApi(apiClient, retryStrategy);
21 | materialApi = new MaterialApi(apiClient, retryStrategy);
22 | tokenApi = new TokenApi(apiClient, retryStrategy);
23 | dmpAudienceApi = new DmpAudienceApi(apiClient, retryStrategy);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/marketing-api-oceanengine/src/main/java/com/hyq0719/mktapi/oceanengine/token/OceanExternalTokenService.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.oceanengine.token;
2 |
3 | import com.hyq0719.mktapi.common.token.ExternalTokenService;
4 |
5 | public abstract class OceanExternalTokenService implements ExternalTokenService {
6 | }
7 |
--------------------------------------------------------------------------------
/marketing-api-tencent/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | marketing-api-sdk
7 | io.github.hyq0719
8 | 1.0.0-beta.2
9 |
10 | 4.0.0
11 |
12 | marketing-api-tencent
13 | 1.0.0-beta.2
14 | Marketing API - Tencent Java SDK
15 | 腾讯广告 Java SDK
16 |
17 |
18 | 8
19 | 8
20 |
21 |
22 |
23 |
24 | io.github.hyq0719
25 | marketing-api-common
26 | ${common.version}
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/TencentApiClient.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent;
2 |
3 | import com.hyq0719.mktapi.common.ApiClient;
4 | import com.hyq0719.mktapi.common.executor.http.HttpHandler;
5 | import com.hyq0719.mktapi.common.token.ExternalTokenService;
6 | import com.hyq0719.mktapi.common.token.cache.ITokenLocalCache;
7 |
8 | public class TencentApiClient extends ApiClient {
9 |
10 | public TencentApiClient(ITokenLocalCache iTokenLocalCache, HttpHandler httpsClient,
11 | ExternalTokenService externalTokenService) {
12 | super(iTokenLocalCache, httpsClient, externalTokenService);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/TencentRetryStrategy.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent;
2 |
3 | import com.hyq0719.mktapi.common.RetryStrategy;
4 |
5 |
6 | public class TencentRetryStrategy implements RetryStrategy {
7 |
8 | private Integer retryCount = 10;
9 |
10 | private Boolean enable = true;
11 |
12 | public void setRetryCount(Integer retryCount) {
13 | if (retryCount == null) {
14 | return;
15 | }
16 | this.retryCount = retryCount;
17 | }
18 |
19 | public void setEnable(Boolean enable) {
20 | if (enable == null) {
21 | return;
22 | }
23 | this.enable = enable;
24 | }
25 |
26 | @Override
27 | public Integer retryCount() {
28 | return retryCount;
29 | }
30 |
31 | @Override
32 | public Boolean retryCondition(Long code) {
33 | return code == 11000;
34 | }
35 |
36 | @Override
37 | public Boolean enable() {
38 | return enable;
39 | }
40 |
41 | @Override
42 | public Boolean isTokenExpired(Long code) {
43 | return code == 11000 || code == 11002;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/api/DataReportApi.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.api;
2 |
3 | import com.hyq0719.mktapi.common.ApiClient;
4 | import com.hyq0719.mktapi.common.RetryStrategy;
5 |
6 | /**
7 | * 腾讯广告——数据洞察api
8 | */
9 | public class DataReportApi extends AbstractTencentApi {
10 |
11 | public DataReportApi(ApiClient apiClient, RetryStrategy retryStrategy) {
12 | super(apiClient, retryStrategy);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/bean/CodeKey.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.bean;
2 |
3 | public interface CodeKey {
4 | Long getCodeKey();
5 |
6 | String getMsg();
7 | }
8 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/bean/IPage.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.bean;
2 |
3 | public interface IPage extends TokenKey {
4 | void exchangeCurrentPage(Integer page);
5 |
6 | Integer currentPageSize();
7 | }
8 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/bean/TokenKey.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.bean;
2 |
3 | public interface TokenKey {
4 | String getTokenKey();
5 | }
6 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/bean/adgroups/AdgroupsAddResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.bean.adgroups;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | /**
8 | * AdgroupsAddResponseData
9 | */
10 | @Data
11 | public class AdgroupsAddResponseData {
12 | @SerializedName("adgroup_id")
13 | private Long adgroupId = null;
14 |
15 | public AdgroupsAddResponseData adgroupId(Long adgroupId) {
16 | this.adgroupId = adgroupId;
17 | return this;
18 | }
19 |
20 | @Override
21 | public String toString() {
22 | Gson gson = new Gson();
23 | return gson.toJson(this);
24 | }
25 |
26 | /**
27 | * Convert the given object to string with each line indented by 4 spaces (except the first line).
28 | */
29 | private String toIndentedString(Object o) {
30 | if (o == null) {
31 | return "null";
32 | }
33 | return o.toString().replace("\n", "\n ");
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/bean/adgroups/AdgroupsDeleteResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.bean.adgroups;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | /**
8 | * AdgroupsDeleteResponseData
9 | */
10 | @Data
11 | public class AdgroupsDeleteResponseData {
12 | @SerializedName("adgroup_id")
13 | private Long adgroupId = null;
14 |
15 | public AdgroupsDeleteResponseData adgroupId(Long adgroupId) {
16 | this.adgroupId = adgroupId;
17 | return this;
18 | }
19 |
20 | @Override
21 | public String toString() {
22 | Gson gson = new Gson();
23 | return gson.toJson(this);
24 | }
25 |
26 | /**
27 | * Convert the given object to string with each line indented by 4 spaces (except the first line).
28 | */
29 | private String toIndentedString(Object o) {
30 | if (o == null) {
31 | return "null";
32 | }
33 | return o.toString().replace("\n", "\n ");
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/bean/batch/ComposeBatchCopyResponse.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.bean.batch;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 |
5 | import java.util.List;
6 |
7 | public class ComposeBatchCopyResponse {
8 |
9 | @SerializedName("list")
10 | private List list;
11 |
12 | public ComposeBatchCopyResponse list(List list) {
13 | this.list = list;
14 | return this;
15 | }
16 |
17 | public List getList() {
18 | return list;
19 | }
20 |
21 | public void setList(List list) {
22 | this.list = list;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/bean/common/BatchResponseData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.bean.common;
2 |
3 | public class BatchResponseData {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/bean/common/RequestListData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.bean.common;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 |
5 | import java.util.List;
6 |
7 | public class RequestListData {
8 | @SerializedName("list")
9 | private List list;
10 |
11 | public RequestListData(List list) {
12 | this.list = list;
13 | }
14 |
15 | public List getList() {
16 | return list;
17 | }
18 |
19 | public void setList(List list) {
20 | this.list = list;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/bean/common/ResponseListData.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.bean.common;
2 |
3 | import com.google.gson.annotations.SerializedName;
4 |
5 | import java.util.List;
6 |
7 | public class ResponseListData {
8 | @SerializedName("list")
9 | private List list;
10 |
11 | public ResponseListData(List list) {
12 | this.list = list;
13 | }
14 |
15 | public List getList() {
16 | return list;
17 | }
18 |
19 | public void setList(List list) {
20 | this.list = list;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/service/TencentSdkService.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.service;
2 |
3 |
4 | import com.hyq0719.mktapi.common.ApiClient;
5 | import com.hyq0719.mktapi.common.RetryStrategy;
6 | import com.hyq0719.mktapi.tencent.api.AccountManagementApi;
7 | import com.hyq0719.mktapi.tencent.api.AdManagementApi;
8 | import com.hyq0719.mktapi.tencent.api.DataReportApi;
9 | import com.hyq0719.mktapi.tencent.api.OauthApi;
10 | import lombok.Getter;
11 |
12 | @Getter
13 | public class TencentSdkService {
14 | private final AccountManagementApi accountManagementApi;
15 | private final AdManagementApi adManagementApi;
16 | private final DataReportApi dataReportApi;
17 | private final OauthApi oauthApi;
18 |
19 | public TencentSdkService(ApiClient apiClient, RetryStrategy retryStrategy) {
20 | accountManagementApi = new AccountManagementApi(apiClient, retryStrategy);
21 | adManagementApi = new AdManagementApi(apiClient, retryStrategy);
22 | dataReportApi = new DataReportApi(apiClient, retryStrategy);
23 | oauthApi = new OauthApi(apiClient, retryStrategy);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/marketing-api-tencent/src/main/java/com/hyq0719/mktapi/tencent/token/TencentExternalTokenService.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.tencent.token;
2 |
3 | import com.hyq0719.mktapi.common.token.ExternalTokenService;
4 |
5 | public abstract class TencentExternalTokenService implements ExternalTokenService {
6 | }
7 |
--------------------------------------------------------------------------------
/marketing-api-vivo/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 |
8 | io.github.hyq0719
9 | marketing-api-sdk
10 | 1.0.0-beta.2
11 |
12 |
13 | marketing-api-vivo
14 | 1.0.0-beta.2
15 | Marketing API - VIVO Java SDK
16 | VIVO商业开放平台 Java SDK
17 |
18 |
19 | ${java.version}
20 | ${java.version}
21 |
22 |
23 |
24 |
25 | io.github.hyq0719
26 | marketing-api-common
27 | ${common.version}
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/VivoApiClient.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo;
2 |
3 | import com.hyq0719.mktapi.common.ApiClient;
4 | import com.hyq0719.mktapi.common.executor.http.HttpHandler;
5 | import com.hyq0719.mktapi.common.token.ExternalTokenService;
6 | import com.hyq0719.mktapi.common.token.cache.ITokenLocalCache;
7 |
8 | public class VivoApiClient extends ApiClient {
9 |
10 | public VivoApiClient(ITokenLocalCache iTokenLocalCache, HttpHandler httpsClient,
11 | ExternalTokenService externalTokenService) {
12 | super(iTokenLocalCache, httpsClient, externalTokenService);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/VivoRetryStrategy.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo;
2 |
3 | import com.hyq0719.mktapi.common.RetryStrategy;
4 |
5 | public class VivoRetryStrategy implements RetryStrategy {
6 |
7 | private Integer retryCount = 3;
8 |
9 | private Boolean enable = true;
10 |
11 | public void setRetryCount(Integer retryCount) {
12 | if (retryCount == null) {
13 | return;
14 | }
15 | this.retryCount = retryCount;
16 | }
17 |
18 | public void setEnable(Boolean enable) {
19 | if (enable == null) {
20 | return;
21 | }
22 | this.enable = enable;
23 | }
24 |
25 | @Override
26 | public Integer retryCount() {
27 | return retryCount;
28 | }
29 |
30 | /**
31 | * @param code 请求返回码
32 | * @return 重试条件:服务异常或请求失败
33 | */
34 | @Override
35 | public Boolean retryCondition(Long code) {
36 | return code == 70110 || code == 70111;
37 | }
38 |
39 | @Override
40 | public Boolean enable() {
41 | return enable;
42 | }
43 |
44 | @Override
45 | public Boolean isTokenExpired(Long code) {
46 | return code == 60005 || code == 60002;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/api/AbstractVivoApi.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo.api;
2 |
3 | import com.hyq0719.mktapi.common.ApiClient;
4 | import com.hyq0719.mktapi.common.RetryStrategy;
5 | import com.hyq0719.mktapi.vivo.VivoApiRequest;
6 |
7 | import java.lang.reflect.Method;
8 |
9 | public class AbstractVivoApi {
10 | public static final String ADVERTISER_ID = "advertiser_id";
11 |
12 | private final ApiClient apiClient;
13 | private final RetryStrategy retryStrategy;
14 |
15 | protected AbstractVivoApi(ApiClient apiClient, RetryStrategy retryStrategy) {
16 | this.apiClient = apiClient;
17 | this.retryStrategy = retryStrategy;
18 | }
19 |
20 | public VivoApiRequest init(Class classObj) {
21 | VivoApiRequest request = null;
22 | try {
23 | request = (VivoApiRequest) classObj.getDeclaredConstructors()[0].newInstance(this);
24 | Method methodSetConfig = classObj.getMethod("setConfig", ApiClient.class, RetryStrategy.class);
25 | methodSetConfig.invoke(request, apiClient, retryStrategy);
26 | } catch (Exception e) {
27 | e.printStackTrace();
28 | }
29 | return request;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/CodeKey.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo.bean;
2 |
3 | public interface CodeKey {
4 | Long getCodeKey();
5 |
6 | String getMsg();
7 | }
8 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/IPage.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo.bean;
2 |
3 | public interface IPage extends TokenKey {
4 | void exchangeCurrentPage(Integer page);
5 |
6 | Integer currentPageSize();
7 | }
8 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/TokenKey.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo.bean;
2 |
3 | public interface TokenKey {
4 | String getTokenKey();
5 | }
6 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/acoountService/AccountAdvertiserQueryResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.acoountService;
8 |
9 | import java.util.List;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 | import com.google.gson.Gson;
13 |
14 | /**
15 | *
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-07 23:14:22
19 | */
20 | @Data
21 | public class AccountAdvertiserQueryResponseData {
22 |
23 | /**
24 | * 分页信息
25 | */
26 | @SerializedName("pageInfo")
27 | private PageInfoStruct pageInfo = null;
28 |
29 | /**
30 | * 对象数据
31 | */
32 | @SerializedName("list")
33 | private List list = null;
34 |
35 | public AccountAdvertiserQueryResponseData pageInfo (PageInfoStruct pageInfo) {
36 | this.pageInfo = pageInfo;
37 | return this;
38 | }
39 |
40 | public AccountAdvertiserQueryResponseData list (List list) {
41 | this.list = list;
42 | return this;
43 | }
44 |
45 | @Override
46 | public String toString() {
47 | Gson gson = new Gson();
48 | return gson.toJson(this);
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/acoountService/AccountBalanceQueryRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.acoountService;
8 |
9 | import com.google.gson.annotations.SerializedName;
10 | import com.hyq0719.mktapi.vivo.bean.TokenKey;
11 | import lombok.Data;
12 | import com.google.gson.Gson;
13 |
14 | /**
15 | *
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-07 23:16:47
19 | */
20 | @Data
21 | public class AccountBalanceQueryRequest implements TokenKey {
22 |
23 | @SerializedName("advertiser_id")
24 | private String advertiserId = null;
25 |
26 | public AccountBalanceQueryRequest advertiserId(String advertiserId) {
27 | this.advertiserId = advertiserId;
28 | return this;
29 | }
30 |
31 | @Override
32 | public String toString() {
33 | Gson gson = new Gson();
34 | return gson.toJson(this);
35 | }
36 |
37 | @Override
38 | public String getTokenKey() {
39 | return String.valueOf(advertiserId);
40 | }
41 |
42 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/acoountService/AccountFetchAccountRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.acoountService;
8 |
9 | import com.google.gson.annotations.SerializedName;
10 | import com.hyq0719.mktapi.vivo.bean.TokenKey;
11 | import lombok.Data;
12 | import com.google.gson.Gson;
13 |
14 | /**
15 | *
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-07 22:57:50
19 | */
20 | @Data
21 | public class AccountFetchAccountRequest implements TokenKey {
22 |
23 | @SerializedName("advertiser_id")
24 | private String advertiserId = null;
25 |
26 | public AccountFetchAccountRequest advertiserId(String advertiserId) {
27 | this.advertiserId = advertiserId;
28 | return this;
29 | }
30 |
31 | @Override
32 | public String toString() {
33 | Gson gson = new Gson();
34 | return gson.toJson(this);
35 | }
36 |
37 | @Override
38 | public String getTokenKey() {
39 | return String.valueOf(advertiserId);
40 | }
41 |
42 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/acoountService/AccountFetchRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.acoountService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import com.hyq0719.mktapi.vivo.bean.TokenKey;
12 | import lombok.Data;
13 |
14 | /**
15 | * @author hyq0719
16 | * @email yueqi.huang@qq.com
17 | * @date 2022-02-07 22:31:31
18 | */
19 | @Data
20 | public class AccountFetchRequest implements TokenKey {
21 |
22 | @SerializedName("advertiser_id")
23 | private String advertiserId = null;
24 |
25 | public AccountFetchRequest advertiserId(String advertiserId) {
26 | this.advertiserId = advertiserId;
27 | return this;
28 | }
29 |
30 | @Override
31 | public String toString() {
32 | Gson gson = new Gson();
33 | return gson.toJson(this);
34 | }
35 |
36 | @Override
37 | public String getTokenKey() {
38 | return String.valueOf(advertiserId);
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/dataQuery/AdstatementSummaryQueryResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.dataQuery;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-04 18:13:59
19 | */
20 | @Data
21 | public class AdstatementSummaryQueryResponseData {
22 |
23 | /**
24 | * 分页坐标
25 | */
26 | @SerializedName("lastId")
27 | private String lastId = null;
28 |
29 | /**
30 | * 列表
31 | */
32 | @SerializedName("items")
33 | private List items = null;
34 |
35 | public AdstatementSummaryQueryResponseData lastId(String lastId) {
36 | this.lastId = lastId;
37 | return this;
38 | }
39 |
40 | public AdstatementSummaryQueryResponseData items(List items) {
41 | this.items = items;
42 | return this;
43 | }
44 |
45 | @Override
46 | public String toString() {
47 | Gson gson = new Gson();
48 | return gson.toJson(this);
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/dataQuery/ChannelInfoQueryResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.dataQuery;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-04 21:31:30
17 | */
18 | @Data
19 | public class ChannelInfoQueryResponseData {
20 |
21 | /**
22 | * 创意ID
23 | */
24 | @SerializedName("adId")
25 | private Long adId = null;
26 |
27 | public ChannelInfoQueryResponseData adId(Long adId) {
28 | this.adId = adId;
29 | return this;
30 | }
31 |
32 | @Override
33 | public String toString() {
34 | Gson gson = new Gson();
35 | return gson.toJson(this);
36 | }
37 |
38 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/dataQuery/DeepLinkQueryResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.dataQuery;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-04 21:09:34
17 | */
18 | @Data
19 | public class DeepLinkQueryResponseData {
20 |
21 | /**
22 | * deeplink地址
23 | */
24 | @SerializedName("deeplink")
25 | private String deeplink = null;
26 |
27 | /**
28 | * 下载时间
29 | */
30 | @SerializedName("downloadTime")
31 | private String downloadTime = null;
32 |
33 | public DeepLinkQueryResponseData deeplink(String deeplink) {
34 | this.deeplink = deeplink;
35 | return this;
36 | }
37 |
38 | public DeepLinkQueryResponseData downloadTime(String downloadTime) {
39 | this.downloadTime = downloadTime;
40 | return this;
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | Gson gson = new Gson();
46 | return gson.toJson(this);
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/dmpTag/AdDmpTagCreateResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.dmpTag;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-04 22:21:52
17 | */
18 | @Data
19 | public class AdDmpTagCreateResponseData {
20 |
21 | /**
22 | * 创建成功时返回人群包id
23 | */
24 | @SerializedName("crowdId")
25 | private Long crowdId = null;
26 |
27 | public AdDmpTagCreateResponseData crowdId(Long crowdId) {
28 | this.crowdId = crowdId;
29 | return this;
30 | }
31 |
32 | @Override
33 | public String toString() {
34 | Gson gson = new Gson();
35 | return gson.toJson(this);
36 | }
37 |
38 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/dmpTag/AdDmpTagModifyResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.dmpTag;
8 |
9 | import com.google.gson.annotations.SerializedName;
10 | import lombok.Data;
11 | import com.google.gson.Gson;
12 |
13 | /**
14 | *
15 | * @author hyq0719
16 | * @email yueqi.huang@qq.com
17 | * @date 2022-02-04 22:56:40
18 | */
19 | @Data
20 | public class AdDmpTagModifyResponseData {
21 |
22 | /**
23 | * 当前更新的人群 id
24 | */
25 | @SerializedName("crowdId")
26 | private Long crowdId = null;
27 |
28 | public AdDmpTagModifyResponseData crowdId (Long crowdId) {
29 | this.crowdId = crowdId;
30 | return this;
31 | }
32 |
33 | @Override
34 | public String toString() {
35 | Gson gson = new Gson();
36 | return gson.toJson(this);
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/dmpTag/AdDmpTagQueryRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.dmpTag;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import com.hyq0719.mktapi.vivo.bean.TokenKey;
12 | import lombok.Data;
13 |
14 | /**
15 | * @author hyq0719
16 | * @email yueqi.huang@qq.com
17 | * @date 2022-02-04 22:51:36
18 | */
19 | @Data
20 | public class AdDmpTagQueryRequest implements TokenKey {
21 |
22 | @SerializedName("advertiser_id")
23 | private String advertiserId = null;
24 |
25 | /**
26 | * 人群包id
27 | */
28 | @SerializedName("crowdId")
29 | private Long crowdId = null;
30 |
31 | public AdDmpTagQueryRequest advertiserId(String advertiserId) {
32 | this.advertiserId = advertiserId;
33 | return this;
34 | }
35 |
36 | public AdDmpTagQueryRequest crowdId(Long crowdId) {
37 | this.crowdId = crowdId;
38 | return this;
39 | }
40 |
41 | @Override
42 | public String toString() {
43 | Gson gson = new Gson();
44 | return gson.toJson(this);
45 | }
46 |
47 | @Override
48 | public String getTokenKey() {
49 | return String.valueOf(advertiserId);
50 | }
51 |
52 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdAdvertisementAddResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-08 13:57:27
17 | */
18 | @Data
19 | public class AdAdvertisementAddResponseData {
20 |
21 | /**
22 | * 广告id
23 | */
24 | @SerializedName("id")
25 | private Long id = null;
26 |
27 | public AdAdvertisementAddResponseData id(Long id) {
28 | this.id = id;
29 | return this;
30 | }
31 |
32 | @Override
33 | public String toString() {
34 | Gson gson = new Gson();
35 | return gson.toJson(this);
36 | }
37 |
38 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdCampaignDelRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import com.hyq0719.mktapi.vivo.bean.TokenKey;
12 | import lombok.Data;
13 |
14 | /**
15 | * @author hyq0719
16 | * @email yueqi.huang@qq.com
17 | * @date 2022-02-08 09:57:34
18 | */
19 | @Data
20 | public class AdCampaignDelRequest implements TokenKey {
21 |
22 | @SerializedName("advertiser_id")
23 | private String advertiserId = null;
24 |
25 | /**
26 | * 计划编号id
27 | */
28 | @SerializedName("id")
29 | private Long id = null;
30 |
31 | public AdCampaignDelRequest advertiserId(String advertiserId) {
32 | this.advertiserId = advertiserId;
33 | return this;
34 | }
35 |
36 | public AdCampaignDelRequest id(Long id) {
37 | this.id = id;
38 | return this;
39 | }
40 |
41 | @Override
42 | public String toString() {
43 | Gson gson = new Gson();
44 | return gson.toJson(this);
45 | }
46 |
47 | @Override
48 | public String getTokenKey() {
49 | return String.valueOf(advertiserId);
50 | }
51 |
52 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdCampaignPageInfoResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-08 10:24:12
19 | */
20 | @Data
21 | public class AdCampaignPageInfoResponseData {
22 |
23 | /**
24 | * 对象数据
25 | */
26 | @SerializedName("list")
27 | private List list = null;
28 |
29 | /**
30 | * 分页信息
31 | */
32 | @SerializedName("pageInfo")
33 | private PageInfoStruct pageInfo = null;
34 |
35 | public AdCampaignPageInfoResponseData list(List list) {
36 | this.list = list;
37 | return this;
38 | }
39 |
40 | public AdCampaignPageInfoResponseData pageInfo(PageInfoStruct pageInfo) {
41 | this.pageInfo = pageInfo;
42 | return this;
43 | }
44 |
45 | @Override
46 | public String toString() {
47 | Gson gson = new Gson();
48 | return gson.toJson(this);
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdCreativeDelRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import com.hyq0719.mktapi.vivo.bean.TokenKey;
12 | import lombok.Data;
13 |
14 | /**
15 | * @author hyq0719
16 | * @email yueqi.huang@qq.com
17 | * @date 2022-02-17 14:24:24
18 | */
19 | @Data
20 | public class AdCreativeDelRequest implements TokenKey {
21 |
22 | @SerializedName("advertiser_id")
23 | private String advertiserId = null;
24 |
25 | /**
26 | * 创意id
27 | */
28 | @SerializedName("id")
29 | private Long id = null;
30 |
31 | public AdCreativeDelRequest advertiserId(String advertiserId) {
32 | this.advertiserId = advertiserId;
33 | return this;
34 | }
35 |
36 | public AdCreativeDelRequest id(Long id) {
37 | this.id = id;
38 | return this;
39 | }
40 |
41 | @Override
42 | public String toString() {
43 | Gson gson = new Gson();
44 | return gson.toJson(this);
45 | }
46 |
47 | @Override
48 | public String getTokenKey() {
49 | return String.valueOf(advertiserId);
50 | }
51 |
52 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdCreativePageInfoResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-17 14:14:10
19 | */
20 | @Data
21 | public class AdCreativePageInfoResponseData {
22 |
23 | /**
24 | * 分页信息
25 | */
26 | @SerializedName("pageInfo")
27 | private PageInfoStruct pageInfo = null;
28 |
29 | /**
30 | * 对象数据
31 | */
32 | @SerializedName("list")
33 | private List list = null;
34 |
35 | public AdCreativePageInfoResponseData pageInfo(PageInfoStruct pageInfo) {
36 | this.pageInfo = pageInfo;
37 | return this;
38 | }
39 |
40 | public AdCreativePageInfoResponseData list(List list) {
41 | this.list = list;
42 | return this;
43 | }
44 |
45 | @Override
46 | public String toString() {
47 | Gson gson = new Gson();
48 | return gson.toJson(this);
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdCreativeQueryAuditStateResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-17 14:30:21
19 | */
20 | @Data
21 | public class AdCreativeQueryAuditStateResponseData {
22 |
23 | /**
24 | * 对象数据
25 | */
26 | @SerializedName("list")
27 | private List list = null;
28 |
29 | public AdCreativeQueryAuditStateResponseData list(List list) {
30 | this.list = list;
31 | return this;
32 | }
33 |
34 | @Override
35 | public String toString() {
36 | Gson gson = new Gson();
37 | return gson.toJson(this);
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdDmpTagGetAdvertiserTagsRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import com.hyq0719.mktapi.vivo.bean.TokenKey;
12 | import lombok.Data;
13 |
14 | /**
15 | * @author hyq0719
16 | * @email yueqi.huang@qq.com
17 | * @date 2022-02-17 15:02:02
18 | */
19 | @Data
20 | public class AdDmpTagGetAdvertiserTagsRequest implements TokenKey {
21 |
22 | @SerializedName("advertiser_id")
23 | private String advertiserId = null;
24 |
25 | public AdDmpTagGetAdvertiserTagsRequest advertiserId(String advertiserId) {
26 | this.advertiserId = advertiserId;
27 | return this;
28 | }
29 |
30 | @Override
31 | public String toString() {
32 | Gson gson = new Gson();
33 | return gson.toJson(this);
34 | }
35 |
36 | @Override
37 | public String getTokenKey() {
38 | return String.valueOf(advertiserId);
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdGroupCvTypeGetResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-08 13:25:33
19 | */
20 | @Data
21 | public class AdGroupCvTypeGetResponseData {
22 |
23 | /**
24 | * 对象数据
25 | */
26 | @SerializedName("ocpxCvTypeVoList")
27 | private List ocpxCvTypeVoList = null;
28 |
29 | public AdGroupCvTypeGetResponseData ocpxCvTypeVoList(List ocpxCvTypeVoList) {
30 | this.ocpxCvTypeVoList = ocpxCvTypeVoList;
31 | return this;
32 | }
33 |
34 | @Override
35 | public String toString() {
36 | Gson gson = new Gson();
37 | return gson.toJson(this);
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdGroupPageInfoResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-08 11:34:09
19 | */
20 | @Data
21 | public class AdGroupPageInfoResponseData {
22 |
23 | /**
24 | * 分页信息
25 | */
26 | @SerializedName("pageInfo")
27 | private PageInfoStruct pageInfo = null;
28 |
29 | /**
30 | * 对象数据
31 | */
32 | @SerializedName("list")
33 | private List list = null;
34 |
35 | public AdGroupPageInfoResponseData pageInfo(PageInfoStruct pageInfo) {
36 | this.pageInfo = pageInfo;
37 | return this;
38 | }
39 |
40 | public AdGroupPageInfoResponseData list(List list) {
41 | this.list = list;
42 | return this;
43 | }
44 |
45 | @Override
46 | public String toString() {
47 | Gson gson = new Gson();
48 | return gson.toJson(this);
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdGroupQuerySkipSwitchResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-08 13:36:36
17 | */
18 | @Data
19 | public class AdGroupQuerySkipSwitchResponseData {
20 |
21 | /**
22 | * 广告组广告id
23 | */
24 | @SerializedName("id")
25 | private Long id = null;
26 |
27 | /**
28 | * 跳过一阶段开关,无值则没有开关选项
29 | */
30 | @SerializedName("skipStageSwitch")
31 | private Boolean skipStageSwitch = null;
32 |
33 | public AdGroupQuerySkipSwitchResponseData id(Long id) {
34 | this.id = id;
35 | return this;
36 | }
37 |
38 | public AdGroupQuerySkipSwitchResponseData skipStageSwitch(Boolean skipStageSwitch) {
39 | this.skipStageSwitch = skipStageSwitch;
40 | return this;
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | Gson gson = new Gson();
46 | return gson.toJson(this);
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdSugRecommendQueryItemsStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo.bean.promotionService;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | import java.util.List;
8 |
9 | /**
10 | * @author hyq0719
11 | * @date 2022/2/17 4:04 下午
12 | */
13 | @Data
14 | public class AdSugRecommendQueryItemsStruct {
15 | @SerializedName("list")
16 | private List list = null;
17 |
18 | public AdSugRecommendQueryItemsStruct list(List list) {
19 | this.list = list;
20 | return this;
21 | }
22 |
23 | @Override
24 | public String toString() {
25 | Gson gson = new Gson();
26 | return gson.toJson(this);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdSugRecommendQueryListStruct.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo.bean.promotionService;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | /**
8 | * @author hyq0719
9 | * @date 2022/2/17 4:06 下午
10 | */
11 | @Data
12 | public class AdSugRecommendQueryListStruct {
13 |
14 | @SerializedName("num")
15 | private String num = null;
16 | @SerializedName("word")
17 | private String word = null;
18 |
19 | public AdSugRecommendQueryListStruct num(String num) {
20 | this.num = num;
21 | return this;
22 | }
23 |
24 | public AdSugRecommendQueryListStruct word(String word) {
25 | this.word = word;
26 | return this;
27 | }
28 |
29 | @Override
30 | public String toString() {
31 | Gson gson = new Gson();
32 | return gson.toJson(this);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/AdSugRecommendQueryResponse.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo.bean.promotionService;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.annotations.SerializedName;
5 | import lombok.Data;
6 |
7 | /**
8 | * @author hyq0719
9 | * @date 2022/2/17 4:02 下午
10 | */
11 | @Data
12 | public class AdSugRecommendQueryResponse {
13 | @SerializedName("code")
14 | private Long code = null;
15 |
16 | @SerializedName("message")
17 | private String message = null;
18 |
19 | @SerializedName("items")
20 | private AdSugRecommendQueryItemsStruct items = null;
21 |
22 | public AdSugRecommendQueryResponse code(Long code) {
23 | this.code = code;
24 | return this;
25 | }
26 |
27 | public AdSugRecommendQueryResponse message(String message) {
28 | this.message = message;
29 | return this;
30 | }
31 |
32 | public AdSugRecommendQueryResponse items(AdSugRecommendQueryItemsStruct items) {
33 | this.items = items;
34 | return this;
35 | }
36 |
37 |
38 | @Override
39 | public String toString() {
40 | Gson gson = new Gson();
41 | return gson.toJson(this);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/CategoriesStruct.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-08 10:51:27
17 | */
18 | @Data
19 | public class CategoriesStruct {
20 |
21 | /**
22 | * 商品类目id
23 | */
24 | @SerializedName("categoryId")
25 | private Long categoryId = null;
26 |
27 | /**
28 | * 商品类目层级(1:一级类目 2:二级类目 3:三级类目 4:四级类目)
29 | */
30 | @SerializedName("categoryLevel")
31 | private Integer categoryLevel = null;
32 |
33 | public CategoriesStruct categoryId(Long categoryId) {
34 | this.categoryId = categoryId;
35 | return this;
36 | }
37 |
38 | public CategoriesStruct categoryLevel(Integer categoryLevel) {
39 | this.categoryLevel = categoryLevel;
40 | return this;
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | Gson gson = new Gson();
46 | return gson.toJson(this);
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/DpaGoodsConfigStruct.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-08 10:51:27
17 | */
18 | @Data
19 | public class DpaGoodsConfigStruct {
20 |
21 | /**
22 | * 商品库id
23 | */
24 | @SerializedName("cpId")
25 | private Long cpId = null;
26 |
27 | /**
28 | * 商品类目
29 | */
30 | @SerializedName("categories")
31 | private CategoriesStruct categories = null;
32 |
33 | public DpaGoodsConfigStruct cpId(Long cpId) {
34 | this.cpId = cpId;
35 | return this;
36 | }
37 |
38 | public DpaGoodsConfigStruct categories(CategoriesStruct categories) {
39 | this.categories = categories;
40 | return this;
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | Gson gson = new Gson();
46 | return gson.toJson(this);
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/FilterConfigVoStruct.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-08 13:25:33
19 | */
20 | @Data
21 | public class FilterConfigVoStruct {
22 |
23 | /**
24 | * 过滤已转换投放端页面可以渲染checkbox的选项范围值,对应管理后台选中配置选中的checkbox选项
25 | */
26 | @SerializedName("filterDaysItems")
27 | private List filterDaysItems = null;
28 |
29 | /**
30 | * 过滤已转换周期类型 0:用户自选 1:平台默认值 2:不过滤
31 | */
32 | @SerializedName("type")
33 | private Integer type = null;
34 |
35 | public FilterConfigVoStruct filterDaysItems(List filterDaysItems) {
36 | this.filterDaysItems = filterDaysItems;
37 | return this;
38 | }
39 |
40 | public FilterConfigVoStruct type(Integer type) {
41 | this.type = type;
42 | return this;
43 | }
44 |
45 | @Override
46 | public String toString() {
47 | Gson gson = new Gson();
48 | return gson.toJson(this);
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/PurposewordCategoryResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-17 14:57:44
19 | */
20 | @Data
21 | public class PurposewordCategoryResponseData {
22 |
23 | /**
24 | * 分页信息
25 | */
26 | @SerializedName("pageInfo")
27 | private PageInfoStruct pageInfo = null;
28 |
29 | /**
30 | * 对象数据
31 | */
32 | @SerializedName("list")
33 | private List list = null;
34 |
35 | public PurposewordCategoryResponseData pageInfo(PageInfoStruct pageInfo) {
36 | this.pageInfo = pageInfo;
37 | return this;
38 | }
39 |
40 | public PurposewordCategoryResponseData list(List list) {
41 | this.list = list;
42 | return this;
43 | }
44 |
45 | @Override
46 | public String toString() {
47 | Gson gson = new Gson();
48 | return gson.toJson(this);
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/PurposewordListResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | import java.util.List;
14 |
15 | /**
16 | * @author hyq0719
17 | * @email yueqi.huang@qq.com
18 | * @date 2022-02-17 14:54:28
19 | */
20 | @Data
21 | public class PurposewordListResponseData {
22 |
23 | /**
24 | * 分页信息
25 | */
26 | @SerializedName("pageInfo")
27 | private PageInfoStruct pageInfo = null;
28 |
29 | /**
30 | * 对象数据
31 | */
32 | @SerializedName("list")
33 | private List list = null;
34 |
35 | public PurposewordListResponseData pageInfo(PageInfoStruct pageInfo) {
36 | this.pageInfo = pageInfo;
37 | return this;
38 | }
39 |
40 | public PurposewordListResponseData list(List list) {
41 | this.list = list;
42 | return this;
43 | }
44 |
45 | @Override
46 | public String toString() {
47 | Gson gson = new Gson();
48 | return gson.toJson(this);
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/bean/promotionService/WordDtoListStruct.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Marketing API Vivo商业开放平台
3 | * Marketing API Vivo商业开放平台
4 | *
5 | * Do not edit the class manually.
6 | */
7 | package com.hyq0719.mktapi.vivo.bean.promotionService;
8 |
9 | import com.google.gson.Gson;
10 | import com.google.gson.annotations.SerializedName;
11 | import lombok.Data;
12 |
13 | /**
14 | * @author hyq0719
15 | * @email yueqi.huang@qq.com
16 | * @date 2022-02-08 13:52:40
17 | */
18 | @Data
19 | public class WordDtoListStruct {
20 |
21 | /**
22 | * 搜索词
23 | */
24 | @SerializedName("word")
25 | private String word = null;
26 |
27 | /**
28 | * 出价,单位毫分,1元=100000毫分,转化成元精确到小数点后一位,搜索提词创意选填
29 | */
30 | @SerializedName("price")
31 | private String price = null;
32 |
33 | public WordDtoListStruct word(String word) {
34 | this.word = word;
35 | return this;
36 | }
37 |
38 | public WordDtoListStruct price(String price) {
39 | this.price = price;
40 | return this;
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | Gson gson = new Gson();
46 | return gson.toJson(this);
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/service/VivoSdkService.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo.service;
2 |
3 | import com.hyq0719.mktapi.common.ApiClient;
4 | import com.hyq0719.mktapi.common.RetryStrategy;
5 | import com.hyq0719.mktapi.vivo.api.*;
6 | import com.hyq0719.mktapi.vivo.api.DataAccessApi;
7 | import lombok.Getter;
8 |
9 | @Getter
10 | public class VivoSdkService {
11 | private final TokenApi tokenApi;
12 | private final AccountServiceApi accountServiceApi;
13 | private final PromotionServiceApi promotionServiceApi;
14 | private final DataQueryApi dataQueryApi;
15 | private final DmpTagApi dmpTagApi;
16 | private final DataAccessApi dataAccessApi;
17 |
18 | public VivoSdkService(ApiClient apiClient, RetryStrategy retryStrategy) {
19 | tokenApi = new TokenApi(apiClient, retryStrategy);
20 | accountServiceApi = new AccountServiceApi(apiClient, retryStrategy);
21 | promotionServiceApi = new PromotionServiceApi(apiClient, retryStrategy);
22 | dataQueryApi = new DataQueryApi(apiClient, retryStrategy);
23 | dmpTagApi = new DmpTagApi(apiClient, retryStrategy);
24 | dataAccessApi = new DataAccessApi(apiClient, retryStrategy);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/marketing-api-vivo/src/main/java/com/hyq0719/mktapi/vivo/token/VivoExternalTokenService.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.mktapi.vivo.token;
2 |
3 | import com.hyq0719.mktapi.common.token.ExternalTokenService;
4 |
5 | public abstract class VivoExternalTokenService implements ExternalTokenService {
6 | }
7 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/AppProperties.java:
--------------------------------------------------------------------------------
1 | package test;
2 |
3 | import lombok.Data;
4 | import org.springframework.boot.context.properties.ConfigurationProperties;
5 | import org.springframework.stereotype.Component;
6 |
7 | import java.util.Set;
8 |
9 | /**
10 | * @author hyq0719
11 | * @date 2022/2/24 3:36 下午
12 | */
13 | @Data
14 | @Component
15 | @ConfigurationProperties("app")
16 | public class AppProperties {
17 | private boolean debugMode;
18 | private RedisClientProperties redisClient;
19 | private Set channels;
20 |
21 | /**
22 | * RedisClient 配置
23 | */
24 | @Data
25 | public static class RedisClientProperties {
26 | private String host;
27 | private int port;
28 | private String password;
29 | /**
30 | * 使用的 DB,默认为 0
31 | */
32 | private int db = 0;
33 | /**
34 | * 连接超时时间(毫秒)
35 | */
36 | private int connectTimeoutMs = 1000;
37 | /**
38 | * 连接池最大数量
39 | */
40 | private int poolMaxSize = 64;
41 | /**
42 | * 连接池最大空闲连接数
43 | */
44 | private int poolMaxIdle = 8;
45 | /**
46 | * 从连接池获取连接最长等待时间(毫秒)
47 | */
48 | private int poolMaxWaitMs = 500;
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/MarketingApiTestApp.java:
--------------------------------------------------------------------------------
1 | package test;
2 |
3 | import lombok.extern.slf4j.Slf4j;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.Bean;
7 | import test.util.RedisClient;
8 |
9 |
10 | @Slf4j
11 | @SpringBootApplication(scanBasePackages = {"test"})
12 | public class MarketingApiTestApp {
13 |
14 | public static void main(String[] args) {
15 | SpringApplication.run(MarketingApiTestApp.class, args);
16 | }
17 |
18 | @Bean(destroyMethod = "close")
19 | public RedisClient redisClient(AppProperties appProp) {
20 | AppProperties.RedisClientProperties redisProp = appProp.getRedisClient();
21 | RedisClient redisClient = new RedisClient(redisProp);
22 | log.info("Connected to redis {}", redisProp);
23 | return redisClient;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/auth/RefreshCronService.java:
--------------------------------------------------------------------------------
1 | package test.auth;
2 |
3 | import cn.hutool.cron.CronUtil;
4 | import cn.hutool.cron.task.Task;
5 | import com.hyq0719.mktapi.common.token.CronService;
6 |
7 | /**
8 | * @author hyq0719
9 | * @date 2022/3/1 2:36 下午
10 | */
11 | public interface RefreshCronService extends CronService {
12 | /**
13 | * @return cron表达式
14 | */
15 | String cron();
16 |
17 | /**
18 | * @return 广告渠道
19 | */
20 | String channel();
21 |
22 | /**
23 | * 开启定时任务
24 | */
25 | @Override
26 | default void run() {
27 | CronUtil.schedule(cron(), (Task) () -> {
28 | try {
29 | trigger();
30 | } catch (Exception e) {
31 | e.printStackTrace();
32 | }
33 | });
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/auth/TokenAuthorizer.java:
--------------------------------------------------------------------------------
1 | package test.auth;
2 |
3 | import test.auth.bean.AuthToken;
4 | import test.auth.bean.Result;
5 |
6 | import java.util.Map;
7 |
8 | /**
9 | * @author hyq0719
10 | * @date 2022/3/1 2:43 下午
11 | */
12 | public interface TokenAuthorizer {
13 | /**
14 | * @return 广告渠道
15 | */
16 | String channel();
17 |
18 | /**
19 | * 解析新增授权参数
20 | *
21 | * @param params 新增授权参数
22 | * @return 授权码
23 | */
24 | Result parseAuthCode(Map params);
25 |
26 | /**
27 | * 新增授权广告主
28 | *
29 | * @param advertiserId 广告主账号
30 | * @param authCode 授权码
31 | * @return 授权token
32 | */
33 | Result authorize(String advertiserId, String authCode);
34 |
35 | /**
36 | * 刷新授权token
37 | *
38 | * @param authToken 授权token
39 | * @return 刷新后的授权token
40 | */
41 | Result refresh(AuthToken authToken);
42 |
43 | /**
44 | * 是否开启调试模式,调试模式只模拟刷新授权token
45 | */
46 | boolean isDebugMode();
47 | }
48 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/auth/oceanengine/OceanProperties.java:
--------------------------------------------------------------------------------
1 | package test.auth.oceanengine;
2 |
3 | import lombok.Data;
4 | import org.springframework.boot.context.properties.ConfigurationProperties;
5 | import org.springframework.boot.context.properties.NestedConfigurationProperty;
6 | import org.springframework.stereotype.Component;
7 |
8 | import java.util.Map;
9 |
10 | /**
11 | * @author hyq0719
12 | * @date 2022/2/25 3:49 下午
13 | */
14 | @Component
15 | @Data
16 | @ConfigurationProperties("mktapi.auth.ocean")
17 | public class OceanProperties {
18 | private String cron;
19 | @NestedConfigurationProperty
20 | private Map configs;
21 |
22 | @Data
23 | public static class OceanOAuth2Config {
24 | private String clientId;
25 | private String secret;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/auth/tencent/TencentProperties.java:
--------------------------------------------------------------------------------
1 | package test.auth.tencent;
2 |
3 | import lombok.Data;
4 | import org.springframework.boot.context.properties.ConfigurationProperties;
5 | import org.springframework.boot.context.properties.NestedConfigurationProperty;
6 | import org.springframework.stereotype.Component;
7 |
8 | import java.util.Map;
9 |
10 | /**
11 | * @author hyq0719
12 | * @date 2022/3/6 10:18 下午
13 | */
14 | @Component
15 | @Data
16 | @ConfigurationProperties("mktapi.auth.tencent")
17 | public class TencentProperties {
18 | private String cron;
19 | @NestedConfigurationProperty
20 | private Map configs;
21 |
22 | @Data
23 | public static class TencentOAuth2Config {
24 | private String clientId;
25 | private String secret;
26 | private String callbackUrl;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/auth/vivo/VivoProperties.java:
--------------------------------------------------------------------------------
1 | package test.auth.vivo;
2 |
3 | import lombok.Data;
4 | import org.springframework.boot.context.properties.ConfigurationProperties;
5 | import org.springframework.boot.context.properties.NestedConfigurationProperty;
6 | import org.springframework.stereotype.Component;
7 |
8 | import java.util.Map;
9 |
10 | /**
11 | * @author hyq0719
12 | * @date 2022/2/24 2:19 下午
13 | */
14 | @Component
15 | @Data
16 | @ConfigurationProperties("mktapi.auth.vivo")
17 | public class VivoProperties {
18 | private String cron;
19 | @NestedConfigurationProperty
20 | private Map configs;
21 |
22 | @Data
23 | public static class VivoOAuth2Config {
24 | private String clientId;
25 | private String secret;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/constant/ChannelConstants.java:
--------------------------------------------------------------------------------
1 | package test.constant;
2 |
3 | /**
4 | * @author hyq0719
5 | * @date 2022/3/1 3:25 下午
6 | */
7 | public interface ChannelConstants {
8 | String KUAISHOU = "kuaishou";
9 | String VIVO = "vivo";
10 | String TENCENT = "tencent";
11 | String OCEAN_ENGINE = "ocean_engine";
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/token/bean/KshToken.java:
--------------------------------------------------------------------------------
1 | package test.token.bean;
2 |
3 | import com.hyq0719.mktapi.common.token.IToken;
4 | import lombok.Data;
5 |
6 | @Data
7 | public class KshToken implements IToken {
8 | private String advertiserId;
9 | private String accessToken;
10 |
11 | public KshToken(String advertiserId, String accessToken) {
12 | this.advertiserId = advertiserId;
13 | this.accessToken = accessToken;
14 | }
15 |
16 | @Override
17 | public String getTokenKey() {
18 | return advertiserId;
19 | }
20 |
21 | @Override
22 | public String getToken() {
23 | return accessToken;
24 | }
25 |
26 | @Override
27 | public Object getConfig() {
28 | return null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/token/bean/OceanToken.java:
--------------------------------------------------------------------------------
1 | package test.token.bean;
2 |
3 | import com.hyq0719.mktapi.common.token.IToken;
4 | import lombok.Data;
5 |
6 | @Data
7 | public class OceanToken implements IToken {
8 | private String advertiserId;
9 | private String accessToken;
10 |
11 | public OceanToken(String advertiserId, String accessToken) {
12 | this.advertiserId = advertiserId;
13 | this.accessToken = accessToken;
14 | }
15 |
16 | @Override
17 | public String getTokenKey() {
18 | return advertiserId;
19 | }
20 |
21 | @Override
22 | public String getToken() {
23 | return accessToken;
24 | }
25 |
26 | @Override
27 | public Object getConfig() {
28 | return null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/token/bean/TencentToken.java:
--------------------------------------------------------------------------------
1 | package test.token.bean;
2 |
3 | import com.hyq0719.mktapi.common.token.IToken;
4 | import lombok.Data;
5 |
6 | @Data
7 | public class TencentToken implements IToken {
8 |
9 | private String accessToken;
10 | private String accountId;
11 |
12 | public TencentToken(String accessToken, String accountId) {
13 | this.accessToken = accessToken;
14 | this.accountId = accountId;
15 | }
16 |
17 | @Override
18 | public String getTokenKey() {
19 | return accountId;
20 | }
21 |
22 | @Override
23 | public String getToken() {
24 | return accessToken;
25 | }
26 |
27 | @Override
28 | public Object getConfig() {
29 | return null;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/token/bean/VivoToken.java:
--------------------------------------------------------------------------------
1 | package test.token.bean;
2 |
3 | import com.hyq0719.mktapi.common.token.IToken;
4 | import lombok.Data;
5 |
6 | @Data
7 | public class VivoToken implements IToken {
8 | private String advertiserId;
9 | private String accessToken;
10 |
11 | public VivoToken(String advertiserId, String accessToken) {
12 | this.advertiserId = advertiserId;
13 | this.accessToken = accessToken;
14 | }
15 |
16 | @Override
17 | public String getTokenKey() {
18 | return advertiserId;
19 | }
20 |
21 | @Override
22 | public String getToken() {
23 | return accessToken;
24 | }
25 |
26 | @Override
27 | public Object getConfig() {
28 | return null;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/token/service/KuaishouTokenService.java:
--------------------------------------------------------------------------------
1 | package test.token.service;
2 |
3 | import com.hyq0719.mktapi.common.token.IToken;
4 | import com.hyq0719.mktapi.kuaishou.token.KshExternalTokenService;
5 | import lombok.extern.slf4j.Slf4j;
6 | import org.springframework.stereotype.Component;
7 | import test.token.bean.KshToken;
8 |
9 | import java.util.ArrayList;
10 | import java.util.List;
11 |
12 | @Slf4j
13 | @Component
14 | public class KuaishouTokenService extends KshExternalTokenService {
15 | /**
16 | * 模拟刷新所有token
17 | */
18 | @Override
19 | public List refreshAllToken() {
20 | log.info("KuaishouTokenService refreshAllToken");
21 | List tokens = new ArrayList<>();
22 | tokens.add(new KshToken("0000000000", "0000000000"));
23 | tokens.add(new KshToken("0000000000", "0000000000"));
24 | return tokens;
25 | }
26 |
27 | /**
28 | * 模拟刷新单个token
29 | *
30 | * @param tokenKey token key
31 | * @return
32 | */
33 | @Override
34 | public IToken refreshToken(String tokenKey) {
35 | return new KshToken("0000000000", "0000000000");
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/util/FileUtil.java:
--------------------------------------------------------------------------------
1 | package test.util;
2 |
3 | import java.io.File;
4 | import java.io.FileInputStream;
5 | import java.io.FileNotFoundException;
6 | import java.io.IOException;
7 | import java.math.BigInteger;
8 | import java.security.MessageDigest;
9 | import java.security.NoSuchAlgorithmException;
10 |
11 | /**
12 | * @author hyq0719
13 | * @date 2022/2/11 10:51 下午
14 | */
15 | public class FileUtil {
16 |
17 | public static String getFileMD5(File file) {
18 | try {
19 | FileInputStream fis = new FileInputStream(file);
20 | MessageDigest md = MessageDigest.getInstance("MD5");
21 | byte[] buffer = new byte[1024];
22 | int length = -1;
23 | while ((length = fis.read(buffer, 0, 1024)) != -1) {
24 | md.update(buffer, 0, length);
25 | }
26 | BigInteger bigInt = new BigInteger(1, md.digest());
27 | return bigInt.toString(16);
28 | } catch (FileNotFoundException e) {
29 | e.printStackTrace();
30 | } catch (NoSuchAlgorithmException e) {
31 | e.printStackTrace();
32 | } catch (IOException e) {
33 | e.printStackTrace();
34 | }
35 | return null;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/util/RedisKeys.java:
--------------------------------------------------------------------------------
1 | package test.util;
2 |
3 | /**
4 | * @author hyq0719
5 | * @date 2022/3/1 2:58 下午
6 | */
7 | public class RedisKeys {
8 | /**
9 | * AuthToken使用hash存储,格式为:
10 | * {
11 | * auth.token:${channel} : {
12 | * advertiserId1 : json(AuthToken1},
13 | * advertiserId2 : json(AuthToken2}
14 | * }
15 | * }
16 | *
17 | * @param channel 广告渠道
18 | * @return json(AuthToken }
19 | */
20 | public static String authToken(String channel) {
21 | return "auth.token:" + channel;
22 | }
23 |
24 | public static String refreshLock(String channel) {
25 | return "auth.refresh.lock:" + channel;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/java/test/util/ResultConverter.java:
--------------------------------------------------------------------------------
1 | package test.util;
2 |
3 | import com.google.common.reflect.TypeToken;
4 | import com.google.gson.Gson;
5 | import com.hyq0719.mktapi.tencent.bean.common.PageResponseData;
6 | import com.hyq0719.mktapi.tencent.bean.common.TencentResponse;
7 | import test.auth.bean.Result;
8 |
9 | /**
10 | * @author hyq0719
11 | * @date 2022/3/7 3:50 下午
12 | */
13 | public class ResultConverter {
14 | @SuppressWarnings("unchecked")
15 | public static Result> parseTencentResult(String str, Class clazz) {
16 | Gson gson = new Gson();
17 | TencentResponse> result = gson.fromJson(str, new TypeToken>>() {
18 | }.getType());
19 | if (result.getCode() != 0) {
20 | return Result.ofFail(Math.toIntExact(result.getCode()), result.getMessage());
21 | }
22 | PageResponseData responseData = result.getData();
23 | if (responseData == null || responseData.getList() == null
24 | || responseData.getPageInfo() == null) {
25 | return Result.ofFail("解析出错");
26 | }
27 | return Result.ofSuccessful(responseData);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/spring-boot-demo/src/main/resources/application.yaml:
--------------------------------------------------------------------------------
1 | spring:
2 | profiles:
3 | active: test
4 |
--------------------------------------------------------------------------------
/spring-boot-starters/kuaishou-spring-boot-starter/src/main/java/com/hyq0719/spring/starter/mktapi/kuaishou/config/CronJobAutoConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.spring.starter.mktapi.kuaishou.config;
2 |
3 | import cn.hutool.cron.CronUtil;
4 | import lombok.extern.slf4j.Slf4j;
5 | import org.springframework.beans.factory.DisposableBean;
6 | import org.springframework.beans.factory.InitializingBean;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | @Configuration
10 | @Slf4j
11 | public class CronJobAutoConfiguration implements InitializingBean, DisposableBean {
12 |
13 |
14 | @Override
15 | public void destroy() throws Exception {
16 | try {
17 | CronUtil.stop();
18 | } catch (Exception e) {
19 | e.printStackTrace();
20 | }
21 | }
22 |
23 | @Override
24 | public void afterPropertiesSet() throws Exception {
25 | log.info("[CRONJOB] TOKEN REFRESH JOB START");
26 | try {
27 | CronUtil.start();
28 | } catch (Exception e) {
29 | e.printStackTrace();
30 | }
31 | log.info("[CRONJOB] TOKEN REFRESH JOB START FINISH");
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/spring-boot-starters/kuaishou-spring-boot-starter/src/main/java/com/hyq0719/spring/starter/mktapi/kuaishou/properties/SdkProperties.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.spring.starter.mktapi.kuaishou.properties;
2 |
3 |
4 | import lombok.Data;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 |
7 | @Data
8 | @ConfigurationProperties("mktapi.sdk")
9 | public class SdkProperties {
10 | private NetConfig net; // 网络配置
11 | private ChannelConfig tencent; // 腾讯广告
12 | private ChannelConfig kuaishou; // 磁力引擎
13 | private ChannelConfig oceanengine; // 巨量引擎
14 | private ChannelConfig vivo; // vivo商业开放平台
15 |
16 | @Data
17 | public static class NetConfig {
18 | private Integer connectTimeout = 20;
19 | private Integer readTimeout = 20;
20 | private Integer writeTimeout = 20;
21 | private ConnectionPool connectionPool;
22 | }
23 |
24 | @Data
25 | public static class ConnectionPool {
26 | private Integer maxIdleConnections = 12;
27 | private Integer keepAliveDuration = 8;
28 | }
29 |
30 | @Data
31 | public static class ChannelConfig {
32 | private Boolean enableRetry = true;
33 | private Integer retryCount = 3;
34 | private String cron;
35 | }
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/spring-boot-starters/kuaishou-spring-boot-starter/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | # Auto Configure
2 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
3 | com.hyq0719.spring.starter.mktapi.kuaishou.config.HttpAutoConfiguration,\
4 | com.hyq0719.spring.starter.mktapi.kuaishou.config.KshAutoConfiguration,\
5 | com.hyq0719.spring.starter.mktapi.kuaishou.config.CronJobAutoConfiguration
6 |
--------------------------------------------------------------------------------
/spring-boot-starters/oceanengine-spring-boot-starter/src/main/java/com/hyq0719/spring/starter/mktapi/oceanengine/config/CronJobAutoConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.spring.starter.mktapi.oceanengine.config;
2 |
3 | import cn.hutool.cron.CronUtil;
4 | import lombok.extern.slf4j.Slf4j;
5 | import org.springframework.beans.factory.DisposableBean;
6 | import org.springframework.beans.factory.InitializingBean;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | @Configuration
10 | @Slf4j
11 | public class CronJobAutoConfiguration implements InitializingBean, DisposableBean {
12 |
13 |
14 | @Override
15 | public void destroy() throws Exception {
16 | try {
17 | CronUtil.stop();
18 | } catch (Exception e) {
19 | e.printStackTrace();
20 | }
21 | }
22 |
23 | @Override
24 | public void afterPropertiesSet() throws Exception {
25 | log.info("[CRONJOB] TOKEN REFRESH JOB START");
26 | try {
27 | CronUtil.start();
28 | } catch (Exception e) {
29 | e.printStackTrace();
30 | }
31 | log.info("[CRONJOB] TOKEN REFRESH JOB START FINISH");
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/spring-boot-starters/oceanengine-spring-boot-starter/src/main/java/com/hyq0719/spring/starter/mktapi/oceanengine/properties/SdkProperties.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.spring.starter.mktapi.oceanengine.properties;
2 |
3 |
4 | import lombok.Data;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 |
7 | @Data
8 | @ConfigurationProperties("mktapi.sdk")
9 | public class SdkProperties {
10 | private NetConfig net; // 网络配置
11 | private ChannelConfig oceanengine; // 巨量引擎
12 |
13 | @Data
14 | public static class NetConfig {
15 | private Integer connectTimeout = 20;
16 | private Integer readTimeout = 20;
17 | private Integer writeTimeout = 20;
18 | private ConnectionPool connectionPool;
19 | }
20 |
21 | @Data
22 | public static class ConnectionPool {
23 | private Integer maxIdleConnections = 12;
24 | private Integer keepAliveDuration = 8;
25 | }
26 |
27 | @Data
28 | public static class ChannelConfig {
29 | private Boolean enableRetry = true;
30 | private Integer retryCount = 3;
31 | private String cron;
32 | }
33 |
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/spring-boot-starters/oceanengine-spring-boot-starter/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | # Auto Configure
2 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
3 | com.hyq0719.spring.starter.mktapi.oceanengine.config.HttpAutoConfiguration,\
4 | com.hyq0719.spring.starter.mktapi.oceanengine.config.OceanAutoConfiguration,\
5 | com.hyq0719.spring.starter.mktapi.oceanengine.config.CronJobAutoConfiguration
6 |
--------------------------------------------------------------------------------
/spring-boot-starters/production-spring-boot-starter/src/main/java/com/hyq0719/spring/starter/mktapi/production/config/CronJobAutoConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.spring.starter.mktapi.production.config;
2 |
3 | import cn.hutool.cron.CronUtil;
4 | import lombok.extern.slf4j.Slf4j;
5 | import org.springframework.beans.factory.DisposableBean;
6 | import org.springframework.beans.factory.InitializingBean;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | @Configuration
10 | @Slf4j
11 | public class CronJobAutoConfiguration implements InitializingBean, DisposableBean {
12 |
13 |
14 | @Override
15 | public void destroy() throws Exception {
16 | try {
17 | CronUtil.stop();
18 | } catch (Exception e) {
19 | e.printStackTrace();
20 | }
21 | }
22 |
23 | @Override
24 | public void afterPropertiesSet() throws Exception {
25 | log.info("[CRONJOB] TOKEN REFRESH JOB START");
26 | try {
27 | CronUtil.start();
28 | } catch (Exception e) {
29 | e.printStackTrace();
30 | }
31 | log.info("[CRONJOB] TOKEN REFRESH JOB START FINISH");
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/spring-boot-starters/production-spring-boot-starter/src/main/java/com/hyq0719/spring/starter/mktapi/production/properties/SdkProperties.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.spring.starter.mktapi.production.properties;
2 |
3 |
4 | import lombok.Data;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 |
7 | @Data
8 | @ConfigurationProperties("mktapi.sdk")
9 | public class SdkProperties {
10 | private NetConfig net; // 网络配置
11 | private ChannelConfig tencent; // 腾讯广告
12 | private ChannelConfig kuaishou; // 磁力引擎
13 | private ChannelConfig oceanengine; // 巨量引擎
14 | private ChannelConfig vivo; // vivo商业开放平台
15 |
16 | @Data
17 | public static class NetConfig {
18 | private Integer connectTimeout = 20;
19 | private Integer readTimeout = 20;
20 | private Integer writeTimeout = 20;
21 | private ConnectionPool connectionPool;
22 | }
23 |
24 | @Data
25 | public static class ConnectionPool {
26 | private Integer maxIdleConnections = 12;
27 | private Integer keepAliveDuration = 8;
28 | }
29 |
30 | @Data
31 | public static class ChannelConfig {
32 | private Boolean enableRetry = true;
33 | private Integer retryCount = 3;
34 | private String cron;
35 | }
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/spring-boot-starters/production-spring-boot-starter/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | # Auto Configure
2 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
3 | com.hyq0719.spring.starter.mktapi.production.config.HttpAutoConfiguration,\
4 | com.hyq0719.spring.starter.mktapi.production.config.TencentAutoConfiguration,\
5 | com.hyq0719.spring.starter.mktapi.production.config.OceanAutoConfiguration,\
6 | com.hyq0719.spring.starter.mktapi.production.config.KshAutoConfiguration,\
7 | com.hyq0719.spring.starter.mktapi.production.config.VivoAutoConfiguration,\
8 | com.hyq0719.spring.starter.mktapi.production.config.CronJobAutoConfiguration
9 |
--------------------------------------------------------------------------------
/spring-boot-starters/tencent-spring-boot-starter/src/main/java/com/hyq0719/spring/starter/mktapi/tencent/config/CronJobAutoConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.spring.starter.mktapi.tencent.config;
2 |
3 | import cn.hutool.cron.CronUtil;
4 | import lombok.extern.slf4j.Slf4j;
5 | import org.springframework.beans.factory.DisposableBean;
6 | import org.springframework.beans.factory.InitializingBean;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | @Configuration
10 | @Slf4j
11 | public class CronJobAutoConfiguration implements InitializingBean, DisposableBean {
12 |
13 |
14 | @Override
15 | public void destroy() throws Exception {
16 | try {
17 | CronUtil.stop();
18 | } catch (Exception e) {
19 | e.printStackTrace();
20 | }
21 | }
22 |
23 | @Override
24 | public void afterPropertiesSet() throws Exception {
25 | log.info("[CRONJOB] TOKEN REFRESH JOB START");
26 | try {
27 | CronUtil.start();
28 | } catch (Exception e) {
29 | e.printStackTrace();
30 | }
31 | log.info("[CRONJOB] TOKEN REFRESH JOB START FINISH");
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/spring-boot-starters/tencent-spring-boot-starter/src/main/java/com/hyq0719/spring/starter/mktapi/tencent/properties/SdkProperties.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.spring.starter.mktapi.tencent.properties;
2 |
3 |
4 | import lombok.Data;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 |
7 | @Data
8 | @ConfigurationProperties("mktapi.sdk")
9 | public class SdkProperties {
10 | private NetConfig net; // 网络配置
11 | private ChannelConfig tencent; // 腾讯广告
12 | private ChannelConfig kuaishou; // 磁力引擎
13 | private ChannelConfig oceanengine; // 巨量引擎
14 | private ChannelConfig vivo; // vivo商业开放平台
15 |
16 | @Data
17 | public static class NetConfig {
18 | private Integer connectTimeout = 20;
19 | private Integer readTimeout = 20;
20 | private Integer writeTimeout = 20;
21 | private ConnectionPool connectionPool;
22 | }
23 |
24 | @Data
25 | public static class ConnectionPool {
26 | private Integer maxIdleConnections = 12;
27 | private Integer keepAliveDuration = 8;
28 | }
29 |
30 | @Data
31 | public static class ChannelConfig {
32 | private Boolean enableRetry = true;
33 | private Integer retryCount = 3;
34 | private String cron;
35 | }
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/spring-boot-starters/tencent-spring-boot-starter/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | # Auto Configure
2 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
3 | com.hyq0719.spring.starter.mktapi.tencent.config.HttpAutoConfiguration,\
4 | com.hyq0719.spring.starter.mktapi.tencent.config.TencentAutoConfiguration,\
5 | com.hyq0719.spring.starter.mktapi.tencent.config.CronJobAutoConfiguration
6 |
--------------------------------------------------------------------------------
/spring-boot-starters/vivo-spring-boot-starter/src/main/java/com/hyq0719/spring/starter/mktapi/vivo/config/CronJobAutoConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.spring.starter.mktapi.vivo.config;
2 |
3 | import cn.hutool.cron.CronUtil;
4 | import lombok.extern.slf4j.Slf4j;
5 | import org.springframework.beans.factory.DisposableBean;
6 | import org.springframework.beans.factory.InitializingBean;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | @Configuration
10 | @Slf4j
11 | public class CronJobAutoConfiguration implements InitializingBean, DisposableBean {
12 |
13 |
14 | @Override
15 | public void destroy() throws Exception {
16 | try {
17 | CronUtil.stop();
18 | } catch (Exception e) {
19 | e.printStackTrace();
20 | }
21 | }
22 |
23 | @Override
24 | public void afterPropertiesSet() throws Exception {
25 | log.info("[CRONJOB] TOKEN REFRESH JOB START");
26 | try {
27 | CronUtil.start();
28 | } catch (Exception e) {
29 | e.printStackTrace();
30 | }
31 | log.info("[CRONJOB] TOKEN REFRESH JOB START FINISH");
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/spring-boot-starters/vivo-spring-boot-starter/src/main/java/com/hyq0719/spring/starter/mktapi/vivo/properties/SdkProperties.java:
--------------------------------------------------------------------------------
1 | package com.hyq0719.spring.starter.mktapi.vivo.properties;
2 |
3 |
4 | import lombok.Data;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 |
7 | @Data
8 | @ConfigurationProperties("mktapi.sdk")
9 | public class SdkProperties {
10 | private NetConfig net; // net配置
11 | private ChannelConfig vivo; // vivo商业开放平台
12 |
13 | @Data
14 | public static class NetConfig {
15 | private Integer connectTimeout = 20;
16 | private Integer readTimeout = 20;
17 | private Integer writeTimeout = 20;
18 | private ConnectionPool connectionPool;
19 | }
20 |
21 | @Data
22 | public static class ConnectionPool {
23 | private Integer maxIdleConnections = 12;
24 | private Integer keepAliveDuration = 8;
25 | }
26 |
27 | @Data
28 | public static class ChannelConfig {
29 | private Boolean enableRetry = true;
30 | private Integer retryCount = 3;
31 | private String cron;
32 | }
33 |
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/spring-boot-starters/vivo-spring-boot-starter/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | # Auto Configure
2 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
3 | com.hyq0719.spring.starter.mktapi.vivo.config.HttpAutoConfiguration,\
4 | com.hyq0719.spring.starter.mktapi.vivo.config.VivoAutoConfiguration,\
5 | com.hyq0719.spring.starter.mktapi.vivo.config.CronJobAutoConfiguration
6 |
--------------------------------------------------------------------------------