public class SearchClient extends AuthClient
connector, gson, token| Constructor and Description |
|---|
SearchClient(ServiceConnector connector) |
clearToken, isTokenValid, parseUserInfoJson, setToken, userInfopublic SearchClient(ServiceConnector connector)
public static void clearClient()
@NotNull public static SearchClient client(ServiceConnector connector)
public void setDefaultCodePack(String codePack)
public SearchResults search(String query) throws CodotaHttpException, CodotaConnectionException
public SearchResults searchByTask(String query) throws CodotaHttpException, CodotaConnectionException
public List<TypeaheadResult> typeahead(String prefix) throws CodotaHttpException, CodotaConnectionException
public XRefTypeaheadResult xreftypeahead(String codepack, String prefix) throws CodotaHttpException, CodotaConnectionException
public XRefTypeaheadResult xreftypeahead(String prefix) throws CodotaHttpException, CodotaConnectionException
public List<XRefMethodItem> xrefMethodsPerClass(String codepack, String classKey) throws CodotaHttpException, CodotaConnectionException
public CrossRefResults searchCrossRef(Map<String,String> props) throws CodotaHttpException, CodotaConnectionException
public List<TextualMatch> textSearch(String term, boolean all) throws CodotaHttpException, CodotaConnectionException
public DependencyInfo getDependencies(String filepath, String artifactName) throws CodotaHttpException, CodotaConnectionException
public List<Map.Entry<String,DependencyInfo>> getArtifactDependencies(String artifactName) throws CodotaHttpException, CodotaConnectionException
public Artifact readArtifact(String artifactName) throws CodotaHttpException, CodotaConnectionException
public List<String> allFilesForArtifact(String artifactName) throws CodotaHttpException, CodotaConnectionException
public List<String> allClassesForArtifact(String artifactName) throws CodotaHttpException, CodotaConnectionException
public SearchStats searchStats(Set<String> queries) throws CodotaHttpException, CodotaConnectionException
@Nullable public Collection<Bookmark> decryptBatch(String decrypt_url, Collection<Bookmark> bookmarks) throws CodotaHttpException
CodotaHttpException@Nullable public String decrypt(String decrypt_url, Bookmark bookmark) throws CodotaHttpException
CodotaHttpExceptionpublic List<String> getManualDependencies(String codePack, String artifactName, String filePath) throws CodotaHttpException, CodotaConnectionException
public void putManualDependencies(String codePack, String artifactName, String filePath, Set<String> dependenciesFullyQualifiedNames) throws CodotaHttpException, CodotaConnectionException
codePack - The code pack to which the artifcat belongs.artifactName - The name of the artifact to which the source file belongs.filePath - The path of the file to which the dependencies shall be attached.dependenciesFullyQualifiedNames - The fully qualified names of the dependencies to attach.
use '/' instead of '.' between package names.CodotaHttpExceptionCodotaConnectionExceptionCopyright © 2018. All rights reserved.