File tree Expand file tree Collapse file tree 3 files changed +10
-12
lines changed
src/test/java/org/typesense/api Expand file tree Collapse file tree 3 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 22
33Java client library for accessing the HTTP API of [ Typesense] ( https://typesense.org ) search engine.
44
5- Note: This package is still under development. Some existing APIs might change or new APIs might be available in the future.
6-
75## Installation
86
9- Download the JAR file from the [ releases] ( https://github.com/typesense/typesense-java/releases ) section of this repository and add it to your project.
7+ The client is available on Maven central:
8+
9+ ``` xml
10+ <dependency >
11+ <groupId >org.typesense</groupId >
12+ <artifactId >typesense-java</artifactId >
13+ <version >0.0.5</version >
14+ </dependency >
15+ ```
1016
1117``` java
1218import org.typesense.api.* ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ repositories {
1010}
1111
1212group = ' org.typesense'
13- version = ' 0.0.4 '
13+ version = ' 0.0.5 '
1414sourceCompatibility = 1.8
1515targetCompatibility = 1.8
1616
@@ -67,11 +67,9 @@ dependencies {
6767 implementation " org.glassfish.jersey.inject:jersey-hk2:3.0.4"
6868 implementation " org.apache.logging.log4j:log4j-api:2.13.3"
6969 implementation " org.apache.logging.log4j:log4j-core:2.13.3"
70- implementation " org.junit.jupiter:junit-jupiter:5.7.0"
7170 implementation " io.swagger.core.v3:swagger-annotations:2.0.0"
7271 implementation " org.glassfish.jersey.connectors:jersey-apache-connector:3.0.4"
7372 implementation " com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.13.2"
74- runtimeOnly " ch.qos.logback:logback-classic:1.2.3"
7573 testImplementation " junit:junit:4.12"
7674 testImplementation " org.hamcrest:hamcrest-all:1.3"
7775 integrationTestImplementation " junit:junit:4.12"
Original file line number Diff line number Diff line change 11package org .typesense .api ;
22
33import junit .framework .TestCase ;
4- import org .junit .jupiter .api .Test ;
5- import org .typesense .api .exceptions .TypesenseError ;
64import org .typesense .model .CollectionResponse ;
75import org .typesense .model .CollectionSchema ;
86import org .typesense .model .Field ;
@@ -27,27 +25,23 @@ public void tearDown() throws Exception {
2725 }
2826
2927
30- @ Test
3128 public void testRetrieveAllCollections () throws Exception {
3229 helper .createTestCollection ();
3330 CollectionResponse [] collectionResponses = client .collections ().retrieve ();
3431 for (CollectionResponse c :collectionResponses )
3532 System .out .println (c );
3633 }
3734
38- @ Test
3935 public void testRetrieveSingleCollection () throws Exception {
4036 helper .createTestCollection ();
4137 System .out .println (client .collections ("books" ).retrieve ());
4238 }
4339
44- @ Test
4540 public void testDeleteCollection () throws Exception {
4641 helper .createTestCollection ();
4742 System .out .println (client .collections ("books" ).delete ());
4843 }
4944
50- @ Test
5145 public void testCreateCollection () throws Exception {
5246
5347 ArrayList <Field > fields = new ArrayList <>();
You can’t perform that action at this time.
0 commit comments