/// <summary> /// Search for bibliographic records /// </summary> /// <param name="options"></param> /// <returns></returns> public PapiResponse <BibSearchResult> BibSearch(BibSearchOptions options) { var url = $"/PAPIService/REST/public/v1/1033/100/{options.Branch}/search/bibs/{options.SearchType}/{options.Qualifier}?q={PolarisEncode(options.Term)}&sort={options.SortOption}&page={options.Page}&bibsperpage={options.PageSize}"; if (!string.IsNullOrWhiteSpace(options.Limit)) { url += $"&limit={options.Limit}"; } return(Execute <BibSearchResult>(HttpMethod.Get, url)); }
public PapiResponse <BibSearchResult> BibKeywordSearch(string term, int branchId = 1, int pageSize = 10) { var options = new BibSearchOptions { Branch = branchId, PageSize = pageSize, Term = term }; return(BibSearch(options)); }
/// <summary> /// Returns list of bibliographic records that match search criteria supplied in the BibSearchOptions object. /// </summary> /// <param name="options">The object containing the options for performing the search.</param> /// <returns>An object containing a list of Bibliographic Record information that meet search criteria.</returns> /// <seealso cref="BibSearchOptions"/> /// <seealso cref="BibSearchResult"/> public BibSearchResult BibSearch(BibSearchOptions options) { var request = new RestRequest( string.Format("public/v1/1300/100/{0}/search/bibs/keyword/{1}?q={2}&sort={3}&page={4}&bibsperpage={5}", options.branch, options.qualifier, HttpUtility.UrlEncode(options.term), options.sort, options.page, options.bibsperpage)); _client.Authenticator = new PolarisPublicAuthenticator(ApiUser, ApiKey, ""); return Execute<BibSearchResult>(request); }
/// <summary> /// Returns list of bibliographic records that match search criteria supplied in the BibSearchOptions object. /// </summary> /// <param name="options">The object containing the options for performing the search.</param> /// <returns>An object containing a list of Bibliographic Record information that meet search criteria.</returns> /// <seealso cref="BibSearchOptions"/> /// <seealso cref="BibSearchResult"/> public BibSearchResult BibSearch(BibSearchOptions options) { var request = new RestRequest( string.Format("public/v1/1300/100/{0}/search/bibs/keyword/{1}?q={2}&sort={3}&page={4}&bibsperpage={5}", options.branch, options.qualifier, HttpUtility.UrlEncode(options.term), options.sort, options.page, options.bibsperpage)); _client.Authenticator = new PolarisPublicAuthenticator(ApiUser, ApiKey, ""); return(Execute <BibSearchResult>(request)); }