public Keyword AttachCampaign(int accountId, string channel, string keyword, int campaignId) { IRestRequest request = TDClient.BuildRequest(Method.POST, KEYWORD_CAMPAIGN, new { accountId, channel, keyword }, campaignId); IRestResponse response = TDClient.InnerExecute(request); return(TDClient.ProcessOperationResponse <Keyword>(request, response, "attach campaign")); }
public Keyword Create(int accountId, string channel, string keyword) { var rval = TDClient.Add(LIST, new { accountId, channel }, new Keyword { Name = keyword }); return(rval); }
public List <Contact> Search(int accountId, string needle) { var request = TDClient.BuildRequest(RestSharp.Method.POST, SEARCH, new { accountId }, needle); var response = TDClient.InnerExecute(request); if (response == null) { return(null); } if (response.StatusCode == HttpStatusCode.NoContent) { return(new List <Contact>()); } return(response.Deserialize <List <Contact> >()); }