コード例 #1
0
 public PostGetMessagesRequest(int accountId, string propertyHref, string idfaStatus, string requestUUID, CampaignsPostGetMessagesRequest campaigns, LocalState localState, IncludeDataPostGetMessagesRequest includeData)
 {
     this.accountId    = accountId;
     this.propertyHref = propertyHref;
     this.idfaStatus   = idfaStatus;
     this.requestUUID  = requestUUID;
     this.campaigns    = campaigns;
     this.localState   = localState;
     this.includeData  = includeData;
 }
コード例 #2
0
    public void GetMessages(int accountId, string propertyHref, CampaignsPostGetMessagesRequest campaigns, Action <string> onSuccessAction, Action <Exception> onErrorAction, int environment, int millisTimeout)
    {
        msTimeout = millisTimeout;
        instance.client.Timeout = TimeSpan.FromMilliseconds(millisTimeout);
        string idfaStatus = "unknown";
        var    dict       = new Dictionary <string, string> {
            { "type", "RecordString" }
        };
        var includeData = new IncludeDataPostGetMessagesRequest()
        {
            localState      = dict,
            messageMetaData = dict,
            TCData          = dict
        };
        var requestBody = new PostGetMessagesRequest(accountId, propertyHref, idfaStatus, GUID.Value, campaigns,
                                                     SaveContext.GetLocalState(),
                                                     // new LocalState(), // TODO: remove & uncomment line above
                                                     includeData);

        Task.Factory.StartNew(async delegate { await PostGetMessages(requestBody, environment, onSuccessAction, onErrorAction); });
    }