Skip to content

Commit

Permalink
Merge pull request #12 from jonahwh/swagger-3-and-new-endpoints
Browse files Browse the repository at this point in the history
Swagger 3 and new endpoints
  • Loading branch information
jonahwh committed Apr 18, 2022
2 parents b8eccae + 0acd6db commit 76c0e81
Show file tree
Hide file tree
Showing 176 changed files with 3,641 additions and 3,581 deletions.
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.23
3.0.34
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ See [swagger.yml](swagger.yml) to view the Swagger document used to generate the
If on Mac and using Homebrew, you can use `brew install swagger-codegen`
3. Generate the library
```bash
swagger-codegen generate \
-i swagger.yml -l java -o . \
--library retrofit2 --api-package com.github.jonahwh.tesla-api-client \
--model-package com.github.jonahwh.tesla-api-client.model
swagger-codegen generate -i swagger.yml -c config.json
```
This will generate the library.
4. Build the library
Expand All @@ -24,13 +21,13 @@ See [swagger.yml](swagger.yml) to view the Swagger document used to generate the

## Installation
### Gradle
compile 'com.github.jonahwh:tesla-api-client:1.17.1'
compile 'com.github.jonahwh:tesla-api-client:2.0.0'

### Maven
<dependency>
<groupId>com.github.jonahwh</groupId>
<artifactId>tesla-api-client</artifactId>
<version>1.17.1</version>
<version>2.0.0</version>
</dependency>


Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apply plugin: 'java-library'

group = 'com.github.jonahwh'
archivesBaseName = 'tesla-api-client'
version = '1.17.1'
version = '2.0.0'

buildscript {
repositories {
Expand Down Expand Up @@ -111,11 +111,11 @@ if(hasProperty('target') && target == 'android') {
}

ext {
oltu_version = "1.0.1"
oltu_version = "1.0.2"
retrofit_version = "2.9.0"
swagger_annotations_version = "1.6.3"
swagger_annotations_version = "2.1.13"
junit_version = "4.13.2"
threetenbp_version = "1.5.1"
threetenbp_version = "1.6.0"
json_fire_version = "1.8.5"

}
Expand All @@ -124,7 +124,7 @@ dependencies {
api "com.squareup.retrofit2:retrofit:$retrofit_version"
api "com.squareup.retrofit2:converter-scalars:$retrofit_version"
api "com.squareup.retrofit2:converter-gson:$retrofit_version"
api "io.swagger:swagger-annotations:$swagger_annotations_version"
api "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version"
api "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
api "io.gsonfire:gson-fire:$json_fire_version"
api "org.threeten:threetenbp:$threetenbp_version"
Expand Down
7 changes: 7 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"lang": "java",
"output": ".",
"library": "retrofit2",
"apiPackage": "com.github.jonahwh.tesla-api-client",
"modelPackage": "com.github.jonahwh.tesla-api-client.model"
}
5 changes: 2 additions & 3 deletions docs/AuthenticationApi.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# AuthenticationApi

All URIs are relative to *https://owner-api.teslamotors.com*
All URIs are relative to *https://owner-api.teslamotors.com/*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createOauthToken**](AuthenticationApi.md#createOauthToken) | **POST** oauth/token | Get an Access Token


<a name="createOauthToken"></a>
# **createOauthToken**
> CreateAccessTokenResponse createOauthToken(body)
Get an Access Token

Performs the login. Takes in an plain text email and password, matching the owner&#39;s login information for [https://my.teslamotors.com/user/login](https://my.teslamotors.com/user/login). Returns a &#x60;access_token&#x60; which is passed along as a header with all future requests to authenticate the user. You must provide the &#x60;Authorization: Bearer {access_token}&#x60; header in all other requests. The current client ID and secret are [available here](http://pastebin.com/YiLPDggh)
Performs the login. Takes in an plain text email and password, matching the owner&#x27;s login information for [https://my.teslamotors.com/user/login](https://my.teslamotors.com/user/login). Returns a &#x60;access_token&#x60; which is passed along as a header with all future requests to authenticate the user. You must provide the &#x60;Authorization: Bearer {access_token}&#x60; header in all other requests. The current client ID and secret are [available here](http://pastebin.com/YiLPDggh)

### Example
```java
Expand Down
4 changes: 0 additions & 4 deletions docs/ChargeState.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# ChargeState

## Properties
Expand Down Expand Up @@ -45,6 +44,3 @@ Name | Type | Description | Notes
**batteryHeaterOn** | **Boolean** | | [optional]
**notEnoughPowerToHeat** | **Boolean** | | [optional]
**timestamp** | [**BigDecimal**](BigDecimal.md) | | [optional]



4 changes: 0 additions & 4 deletions docs/ChargeStateResponse.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

# ChargeStateResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**response** | [**ChargeState**](ChargeState.md) | |



4 changes: 0 additions & 4 deletions docs/ClimateSettingsResponse.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

# ClimateSettingsResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**response** | [**ClimateState**](ClimateState.md) | |



4 changes: 0 additions & 4 deletions docs/ClimateState.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# ClimateState

## Properties
Expand Down Expand Up @@ -33,6 +32,3 @@ Name | Type | Description | Notes
**isAutoConditioningOn** | **Boolean** | | [optional]
**defrostMode** | **Integer** | | [optional]
**timestamp** | [**BigDecimal**](BigDecimal.md) | | [optional]



4 changes: 0 additions & 4 deletions docs/CommandResponse.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

# CommandResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**response** | [**CommandResponseResponse**](CommandResponseResponse.md) | |



4 changes: 0 additions & 4 deletions docs/CommandResponseResponse.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@

# CommandResponseResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **Boolean** | | [optional]
**reason** | **String** | | [optional]



11 changes: 0 additions & 11 deletions docs/CommandResponse_response.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/CreateAccessTokenRequest.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# CreateAccessTokenRequest

## Properties
Expand All @@ -10,6 +9,3 @@ Name | Type | Description | Notes
**email** | **String** | The email for my.teslamotors.com. Only used with \&quot;password\&quot; grant type. | [optional]
**password** | **String** | The password for my.teslamotors.com. Only used with \&quot;password\&quot; grant type. | [optional]
**refreshToken** | **String** | A refresh token from a previous CreateAccessTokenResponse | [optional]



4 changes: 0 additions & 4 deletions docs/CreateAccessTokenResponse.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# CreateAccessTokenResponse

## Properties
Expand All @@ -9,6 +8,3 @@ Name | Type | Description | Notes
**expiresIn** | **Integer** | |
**createdAt** | **Integer** | |
**refreshToken** | **String** | |



4 changes: 0 additions & 4 deletions docs/DestinationCharger.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# DestinationCharger

## Properties
Expand All @@ -8,6 +7,3 @@ Name | Type | Description | Notes
**name** | **String** | | [optional]
**type** | **String** | | [optional]
**distanceMiles** | **Double** | | [optional]



4 changes: 0 additions & 4 deletions docs/DestinationChargerLocation.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@

# DestinationChargerLocation

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**lat** | **Double** | | [optional]
**_long** | **Double** | | [optional]



11 changes: 0 additions & 11 deletions docs/DestinationCharger_location.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/DriveState.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# DriveState

## Properties
Expand All @@ -16,6 +15,3 @@ Name | Type | Description | Notes
**nativeLongitude** | **Double** | | [optional]
**nativeType** | **String** | | [optional]
**timestamp** | [**BigDecimal**](BigDecimal.md) | | [optional]



4 changes: 0 additions & 4 deletions docs/DriveStateResponse.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

# DriveStateResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**response** | [**DriveState**](DriveState.md) | |



10 changes: 0 additions & 10 deletions docs/FlashLightsResponse.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/GetVehiclesResponse.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@

# GetVehiclesResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**response** | [**List&lt;Vehicle&gt;**](Vehicle.md) | |
**count** | **Integer** | |



4 changes: 0 additions & 4 deletions docs/GuiState.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# GuiState

## Properties
Expand All @@ -10,6 +9,3 @@ Name | Type | Description | Notes
**gui24HourTime** | **Boolean** | | [optional]
**guiRangeDisplay** | **String** | | [optional]
**timestamp** | [**BigDecimal**](BigDecimal.md) | | [optional]



4 changes: 0 additions & 4 deletions docs/GuistateResponse.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

# GuistateResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**response** | [**GuiState**](GuiState.md) | |



10 changes: 0 additions & 10 deletions docs/HonkHornResponse.md

This file was deleted.

10 changes: 0 additions & 10 deletions docs/LockDoorsResponse.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/MaxDefrostRequest.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

# MaxDefrostRequest

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**on** | **Boolean** | | [optional]



Loading

0 comments on commit 76c0e81

Please sign in to comment.