├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── src ├── test │ ├── resources │ │ ├── _uber.properties │ │ └── locations.properties │ └── java │ │ └── com │ │ └── victorsima │ │ └── uber │ │ └── test │ │ ├── suite │ │ ├── MockServerTestSuite.java │ │ └── SandboxServerTestSuite.java │ │ ├── MockServerTest.java │ │ ├── mock │ │ └── MockApiClient.java │ │ ├── BaseTest.java │ │ └── SandboxServerTest.java └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── victorsima │ └── uber │ ├── exception │ ├── ForbiddenException.java │ ├── UnauthorizedException.java │ └── ConflictException.java │ ├── model │ ├── Location.java │ ├── request │ │ ├── Error.java │ │ ├── Meta.java │ │ ├── RequestMap.java │ │ ├── SurgeConfirmationError.java │ │ ├── SurgeConfirmation.java │ │ ├── Request.java │ │ └── RequestBody.java │ ├── Times.java │ ├── Prices.java │ ├── Products.java │ ├── sandbox │ │ ├── SandboxRequestBody.java │ │ ├── SandboxProductBody.java │ │ └── SandboxService.java │ ├── Time.java │ ├── Promotion.java │ ├── UserActivity.java │ ├── Driver.java │ ├── Vehicle.java │ ├── Product.java │ ├── AccessToken.java │ ├── UserProfile.java │ ├── UserHistory.java │ └── Price.java │ ├── Utils.java │ ├── UberAuthService.java │ ├── UberClient.java │ └── UberService.java ├── .gitignore ├── .utility └── push-javadoc-to-gh-pages.sh ├── LICENSE ├── .travis.yml ├── _pom.xml ├── gradlew.bat ├── README.md └── gradlew /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsima/uber-java-client/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/test/resources/_uber.properties: -------------------------------------------------------------------------------- 1 | uber_client_id= 2 | uber_secret= 3 | uber_server_token= 4 | uber_redirect_url= 5 | uber_username= 6 | uber_password= 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | uber-java-client.iml 3 | /target 4 | src/test/resources/uber.properties 5 | .DS_Store 6 | /build 7 | /.gradle 8 | gradle.properties 9 | local.properties 10 | -------------------------------------------------------------------------------- /src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/test/resources/locations.properties: -------------------------------------------------------------------------------- 1 | uber_product_latitude=40.6593619 2 | uber_product_longitude=-73.9878566 3 | uber_price_start_latitude=40.6593619 4 | uber_price_start_longitude=-73.9878566 5 | uber_price_end_latitude=40.74844 6 | uber_price_end_longitude=-73.985664 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Sep 07 09:04:11 EDT 2014 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip 7 | -------------------------------------------------------------------------------- /src/main/java/com/victorsima/uber/exception/ForbiddenException.java: -------------------------------------------------------------------------------- 1 | package com.victorsima.uber.exception; 2 | 3 | /** 4 | * An obj representing a HTTP 403 Forbidden error 5 | */ 6 | public class ForbiddenException extends Exception { 7 | 8 | public ForbiddenException() { 9 | super("HTTP 403 error"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/victorsima/uber/exception/UnauthorizedException.java: -------------------------------------------------------------------------------- 1 | package com.victorsima.uber.exception; 2 | 3 | /** 4 | * An obj representing a HTTP 401 Unauthorized error 5 | */ 6 | public class UnauthorizedException extends Exception { 7 | 8 | public UnauthorizedException() { 9 | super("HTTP 401 error"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/victorsima/uber/exception/ConflictException.java: -------------------------------------------------------------------------------- 1 | package com.victorsima.uber.exception; 2 | 3 | /** 4 | * An obj representing a HTTP 409 Conflict error used for surge confirmations 5 | */ 6 | public class ConflictException extends Exception { 7 | 8 | public ConflictException() { 9 | super("HTTP 403 error"); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/test/java/com/victorsima/uber/test/suite/MockServerTestSuite.java: -------------------------------------------------------------------------------- 1 | package com.victorsima.uber.test.suite; 2 | 3 | import com.victorsima.uber.test.MockServerTest; 4 | import org.junit.runner.RunWith; 5 | import org.junit.runners.Suite; 6 | 7 | /** 8 | * Created by victorsima on 3/19/15. 9 | */ 10 | @RunWith(Suite.class) 11 | @Suite.SuiteClasses({MockServerTest.class}) 12 | public class MockServerTestSuite { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/test/java/com/victorsima/uber/test/suite/SandboxServerTestSuite.java: -------------------------------------------------------------------------------- 1 | package com.victorsima.uber.test.suite; 2 | 3 | import com.victorsima.uber.test.SandboxServerTest; 4 | import org.junit.Before; 5 | import org.junit.runner.RunWith; 6 | import org.junit.runners.Suite; 7 | 8 | /** 9 | * Created by victorsima on 3/19/15. 10 | */ 11 | @RunWith(Suite.class) 12 | @Suite.SuiteClasses({SandboxServerTest.class}) 13 | public class SandboxServerTestSuite { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/victorsima/uber/model/Location.java: -------------------------------------------------------------------------------- 1 | package com.victorsima.uber.model; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | /** 7 | * Created by victorsima on 3/22/15. 8 | */ 9 | public class Location { 10 | 11 | @Expose 12 | @SerializedName("latitude") 13 | private float latitude; 14 | 15 | @Expose 16 | @SerializedName("longitude") 17 | private float longitude; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/victorsima/uber/model/request/Error.java: -------------------------------------------------------------------------------- 1 | package com.victorsima.uber.model.request; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | /** 7 | * Created by victorsima on 3/22/15. 8 | */ 9 | public class Error { 10 | 11 | @Expose 12 | @SerializedName("status") 13 | private int status; 14 | 15 | @Expose 16 | @SerializedName("code") 17 | private String code; 18 | 19 | @Expose 20 | @SerializedName("title") 21 | private String title; 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/victorsima/uber/model/Times.java: -------------------------------------------------------------------------------- 1 | package com.victorsima.uber.model; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Times model obj 10 | */ 11 | public class Times { 12 | 13 | @Expose 14 | @SerializedName("times") 15 | private List