/// <summary> /// Get template by its name in a given creative /// </summary> /// <param name="creativeId"></param> /// <param name="templateName"></param> /// <returns></returns> public DMTemplate GetTemplate(int creativeId, string templateName) { return(CreativeBuilder .GetCreativeTemplates(Token, creativeId) .SingleOrDefault(a => a.Name == templateName)); }
/// <summary> /// Get creative variable by variable name /// </summary> /// <param name="creativeId"></param> /// <param name="name"></param> /// <returns></returns> public DMVariable GetCreativeVariable(int creativeId, string name) { return(CreativeBuilder .GetCreativeVariables(Token, creativeId) .SingleOrDefault(a => a.Name.ToLower() == name.ToLower())); }