/// <summary> /// Adds tags to an existing workbook. /// </summary> /// <param name="workbookId">The Workbook ID of the workbook to add tags to.</param> /// <param name="tags">A list of tags to add to the workbook.</param> public void AddTagsToWorkbook(string workbookId, ISet <string> tags) { if (tags.Count == 0) { return; } var uri = Endpoints.GetAddTagsToWorkbookUri(baseUri, GetSiteId(), workbookId); // Copy tags into tag array type. tagType[] tagArray = new tagType[tags.Count]; for (int i = 0; i < tags.Count; i++) { tagType tag = new tagType { label = tags.ToList()[i] }; tagArray[i] = tag; } // Construct payload. tsRequest requestPayload = new tsRequest { Item = new tagListType { tag = tagArray } }; // Issue request. var errorMessage = "Failed to add tags to workbook"; ApiRequest request = new ApiRequest(uri, HttpMethod.Put, GetAuthToken(), headers: null, body: requestPayload.SerializeBody()); request.IssueRequest(errorMessage); }
public static string Build(string scopusId, tagType tag = tagType.text) { if (tag == tagType.link) { return($@"<a href='https://www.scopus.com/authid/detail.uri?authorId={scopusId}'>Scopus</a>"); } if (tag == tagType.span) { return($@"<span>https://www.scopus.com/authid/detail.uri?authorId={scopusId}</span>"); } if (tag == tagType.div) { return($@"<div>https://www.scopus.com/authid/detail.uri?authorId={scopusId}</div>"); } return($@"https://www.scopus.com/authid/detail.uri?authorId={scopusId}"); }
public Tag(string tagname, tagType type) { _tagName = tagname; _type = type; }
public Tag(tagType type) { _type = type; }