Supported API MassPush for Push Message or Notice.
This commit is contained in:
@@ -40,6 +40,8 @@
|
||||
#include "model/ListSummaryAppsResult.h"
|
||||
#include "model/ListTagsRequest.h"
|
||||
#include "model/ListTagsResult.h"
|
||||
#include "model/MassPushRequest.h"
|
||||
#include "model/MassPushResult.h"
|
||||
#include "model/PushRequest.h"
|
||||
#include "model/PushResult.h"
|
||||
#include "model/PushMessageToAndroidRequest.h"
|
||||
@@ -114,6 +116,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListTagsResult> ListTagsOutcome;
|
||||
typedef std::future<ListTagsOutcome> ListTagsOutcomeCallable;
|
||||
typedef std::function<void(const PushClient*, const Model::ListTagsRequest&, const ListTagsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagsAsyncHandler;
|
||||
typedef Outcome<Error, Model::MassPushResult> MassPushOutcome;
|
||||
typedef std::future<MassPushOutcome> MassPushOutcomeCallable;
|
||||
typedef std::function<void(const PushClient*, const Model::MassPushRequest&, const MassPushOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MassPushAsyncHandler;
|
||||
typedef Outcome<Error, Model::PushResult> PushOutcome;
|
||||
typedef std::future<PushOutcome> PushOutcomeCallable;
|
||||
typedef std::function<void(const PushClient*, const Model::PushRequest&, const PushOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PushAsyncHandler;
|
||||
@@ -203,6 +208,9 @@ namespace AlibabaCloud
|
||||
ListTagsOutcome listTags(const Model::ListTagsRequest &request)const;
|
||||
void listTagsAsync(const Model::ListTagsRequest& request, const ListTagsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListTagsOutcomeCallable listTagsCallable(const Model::ListTagsRequest& request) const;
|
||||
MassPushOutcome massPush(const Model::MassPushRequest &request)const;
|
||||
void massPushAsync(const Model::MassPushRequest& request, const MassPushAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
MassPushOutcomeCallable massPushCallable(const Model::MassPushRequest& request) const;
|
||||
PushOutcome push(const Model::PushRequest &request)const;
|
||||
void pushAsync(const Model::PushRequest& request, const PushAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
PushOutcomeCallable pushCallable(const Model::PushRequest& request) const;
|
||||
|
||||
95
push/include/alibabacloud/push/model/MassPushRequest.h
Normal file
95
push/include/alibabacloud/push/model/MassPushRequest.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_PUSH_MODEL_MASSPUSHREQUEST_H_
|
||||
#define ALIBABACLOUD_PUSH_MODEL_MASSPUSHREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/push/PushExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Push
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_PUSH_EXPORT MassPushRequest : public RpcServiceRequest
|
||||
{
|
||||
struct PushTask
|
||||
{
|
||||
int androidNotificationBarType;
|
||||
std::string androidExtParameters;
|
||||
int iOSBadge;
|
||||
bool iOSBadgeAutoIncrement;
|
||||
std::string androidOpenType;
|
||||
std::string title;
|
||||
std::string body;
|
||||
std::string deviceType;
|
||||
std::string pushTime;
|
||||
int sendSpeed;
|
||||
std::string androidPopupActivity;
|
||||
std::string iOSRemindBody;
|
||||
std::string iOSExtParameters;
|
||||
std::string androidNotifyType;
|
||||
std::string androidPopupTitle;
|
||||
std::string iOSMusic;
|
||||
std::string iOSApnsEnv;
|
||||
bool iOSMutableContent;
|
||||
int androidNotificationBarPriority;
|
||||
std::string expireTime;
|
||||
std::string androidPopupBody;
|
||||
std::string iOSNotificationCategory;
|
||||
bool storeOffline;
|
||||
bool iOSSilentNotification;
|
||||
std::string jobKey;
|
||||
std::string target;
|
||||
std::string androidOpenUrl;
|
||||
std::string androidNotificationChannel;
|
||||
bool androidRemind;
|
||||
std::string androidActivity;
|
||||
std::string androidXiaoMiNotifyBody;
|
||||
std::string iOSSubtitle;
|
||||
bool iOSRemind;
|
||||
std::string targetValue;
|
||||
std::string androidMusic;
|
||||
std::string androidXiaoMiActivity;
|
||||
std::string androidXiaoMiNotifyTitle;
|
||||
std::string pushType;
|
||||
};
|
||||
|
||||
public:
|
||||
MassPushRequest();
|
||||
~MassPushRequest();
|
||||
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::vector<PushTask> getPushTask()const;
|
||||
void setPushTask(const std::vector<PushTask>& pushTask);
|
||||
long getAppKey()const;
|
||||
void setAppKey(long appKey);
|
||||
|
||||
private:
|
||||
std::string accessKeyId_;
|
||||
std::vector<PushTask> pushTask_;
|
||||
long appKey_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_PUSH_MODEL_MASSPUSHREQUEST_H_
|
||||
51
push/include/alibabacloud/push/model/MassPushResult.h
Normal file
51
push/include/alibabacloud/push/model/MassPushResult.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_PUSH_MODEL_MASSPUSHRESULT_H_
|
||||
#define ALIBABACLOUD_PUSH_MODEL_MASSPUSHRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/push/PushExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Push
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_PUSH_EXPORT MassPushResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
MassPushResult();
|
||||
explicit MassPushResult(const std::string &payload);
|
||||
~MassPushResult();
|
||||
std::vector<std::string> getMessageIds()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<std::string> messageIds_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_PUSH_MODEL_MASSPUSHRESULT_H_
|
||||
Reference in New Issue
Block a user