コード例 #1
0
        public ExternalActivities Post(ExternalActivities activities)
        {
            var request = new RestRequest(Method.POST)
            {
                RequestFormat = DataFormat.Json,
                Resource = "/data/activity"
            };

            return _baseClient.Execute<ExternalActivities>(request);
        }
        public void CreateAndReadActivityTest()
        {
            Activity activity = new Activity();
            ExternalActivities externalActivities = new ExternalActivities();
            externalActivities.activityDate = "1362543780";
            externalActivities.activityType = "Webinar";
            externalActivities.assetName = "TEST_GENERIC_Asset";
            externalActivities.assetType = "Test_Generic_Asset_Type";
            externalActivities.contactId = "100";
            externalActivities.campaignId = "4";
            externalActivities.type = "ExternalActivities";

            ExternalActivities postExternalActivities;
            postExternalActivities = _client.Data.ExternalActivity.Post(externalActivities);
            ExternalActivities returnExternalActivities;
            returnExternalActivities = _client.Data.ExternalActivity.Get(int.Parse(postExternalActivities.contactId));
        }