public UserDetailContract GetCurrentUser() { try { return(m_client.Get <UserDetailContract>("user/current")); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public List <string> GetPublisherAutoComplete(string query) { try { var publishers = m_client.Get <List <string> >($"metadata/publisher/autocomplete?query={query}"); return(publishers); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public List <RoleContract> GetRoleAutocomplete(string query) { try { var result = m_client.Get <List <RoleContract> >("role/autocomplete".AddQueryString("query", query)); return(result); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public List <CardFileContract> GetCardFiles() { try { var result = m_client.Get <List <CardFileContract> >("cardfile"); return(result); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public IList <FilteringExpressionSetContract> GetAllFilteringExpressionSets() { try { var result = m_client.Get <IList <FilteringExpressionSetContract> >($"bibliography/filtering-expression-set/all"); return(result); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public BookContract GetBookInfo(long projectId) { try { var result = m_client.Get <BookContract>($"book/{projectId}"); return(result); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public List <TermCategoryDetailContract> GetTermCategoriesWithTerms() { try { var result = m_client.Get <List <TermCategoryDetailContract> >("term/category/detail"); return(result); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public SnapshotDetailContract GetSnapshot(long snapshotId) { try { var result = m_client.Get <SnapshotDetailContract>($"{BasePath}/{snapshotId}"); return(result); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public List <FavoriteLabelContract> GetFavoriteLabelList(int?count = null) { try { var result = m_client.Get <List <FavoriteLabelContract> >(UrlQueryBuilder.Create("favorite/label").AddParameter("count", count) .ToResult()); return(result); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public IList <ExternalRepositoryContract> GetAllExternalRepositories() { try { var result = m_client.Get <IList <ExternalRepositoryContract> >($"bibliography/repository/all"); return(result); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }
public ProjectDetailContract GetProject(long projectId, bool fetchPageCount = false, bool fetchPermissions = false) { try { var project = m_client.Get <ProjectDetailContract>($"project/{projectId}?fetchPageCount={fetchPageCount}&fetchPermissions={fetchPermissions}"); return(project); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }