All Projects → JagCesar → Tesla-API

JagCesar / Tesla-API

Licence: MIT license
A iOS, macOS, watchOS and tvOS framework written in Swift to communicate with Teslas vehicle API

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Tesla-API

WWDCNotes
WWDCNotes.com content
Stars: ✭ 343 (+971.88%)
Mutual labels:  tvos, watchos
teslaapi.io
Unofficial Tesla API Documentation
Stars: ✭ 29 (-9.37%)
Mutual labels:  tesla, tesla-api
Futures
Lightweight promises for iOS, macOS, tvOS, watchOS, and Linux
Stars: ✭ 59 (+84.38%)
Mutual labels:  tvos, watchos
SwiftBuilder
SwiftBuilder is a fast way to assign new value to the property of the object.
Stars: ✭ 26 (-18.75%)
Mutual labels:  tvos, watchos
TeslaKit
Elegant Tesla API in Swift
Stars: ✭ 47 (+46.88%)
Mutual labels:  tesla, tesla-api
KeyboardKitPro
KeyboardKit Pro extends KeyboardKit with pro features.
Stars: ✭ 42 (+31.25%)
Mutual labels:  tvos, watchos
wwdc2018
You read my developer triceraptus migration notes from dub dub dc 2018
Stars: ✭ 48 (+50%)
Mutual labels:  tvos, watchos
Wwdc
You don't have the time to watch all the WWDC session videos yourself? No problem me and many contributors extracted the gist for you 🥳
Stars: ✭ 2,561 (+7903.13%)
Mutual labels:  tvos, watchos
Orchard
Device identification in Swift and Objective-C for iOS, watchOS, and tvOS.
Stars: ✭ 15 (-53.12%)
Mutual labels:  tvos, watchos
Outlaw
JSON mapper for macOS, iOS, tvOS, and watchOS
Stars: ✭ 24 (-25%)
Mutual labels:  tvos, watchos
tesla.dart
Tesla Client Library for Dart
Stars: ✭ 28 (-12.5%)
Mutual labels:  tesla, tesla-api
SwiftKit
SwiftKit adds extra functionality to the Swift programming language.
Stars: ✭ 47 (+46.88%)
Mutual labels:  tvos, watchos
Swiftui Sliders
🚀 SwiftUI Sliders with custom styles
Stars: ✭ 241 (+653.13%)
Mutual labels:  tvos, watchos
RFKit
Toolkit for daily Cocoa development. Since 2012.
Stars: ✭ 20 (-37.5%)
Mutual labels:  tvos, watchos
Fire
🔥A delightful HTTP/HTTPS networking framework for iOS/macOS/watchOS/tvOS platforms written in Swift.
Stars: ✭ 243 (+659.38%)
Mutual labels:  tvos, watchos
articles-ko
Articles for NSHipster.co.kr
Stars: ✭ 18 (-43.75%)
Mutual labels:  tvos, watchos
Iso8601
ISO8601 date parser and writer
Stars: ✭ 213 (+565.63%)
Mutual labels:  tvos, watchos
Human Interface Guidelines Extras
Community additions to Apple's Human Interface Guidelines
Stars: ✭ 225 (+603.13%)
Mutual labels:  tvos, watchos
ScaledFont
ScaledFont - Using custom fonts with dynamic type
Stars: ✭ 50 (+56.25%)
Mutual labels:  tvos, watchos
SwiftCurrent
A library for managing complex workflows in Swift
Stars: ✭ 286 (+793.75%)
Mutual labels:  tvos, watchos

Tesla API supports 📱 🖥 📺

Tesla-API License

This is a Swift package that works with

  • iOS
  • macOS
  • watchOS
  • tvOS

It handles the communication with the vehicle API by Tesla and offers an easy to use interface. The implementation is based on the Unofficial Tesla Model S API.

Purpose

I want to be a part of the Tesla community and since I have a lot of experience with iOS engineering I decided that this was the best way to contribute.

This framework is and will always be open source. This way you can be sure there isn't anything weird going on under the hood (pun intended). And for further safety I will never precompile the framework and attach it to the release tags.

I hope that open sourcing this will also inspire people to write awesome Tesla apps and help Tesla on their mission.

Dependencies

I want to avoid adding 3rd party dependencies to this project. Having 3rd party dependencies opens up the opportunity for someone to inject evil code into this project and makes it more difficult to start using this project. The goal is for anyone who knows Swift and Foundation to hit the ground running.

How to get started

The best way to use this code in your project is to add is as a Swift Package dependency. Check out this tutorial by Apple to get started.

How to use

First thing you have to do is import TeslaAPI in each file where you want to use it. You do this by writing import TeslaAPI at the top of the file.

To sign in and receive an authentication token you write:

AuthenticateRequest(
    username: username,
    password: password).execute { result in
    switch result {
        case .success(let token):
            // Handle success of login here.
        case .failure(let error):
            // Handle error here. The error object might give you a hint what went wrong.
    }
}

The object token given in the .success case contains everything you need to make further requests as this user. Please note that this framework does not handle saving of this token. You have to persist this token in a way that you think makes sense. I suggest storing it in the keychain.

Are there any other requests?

I'll continuously add support for more endpoints, and I encourage you to submit PR's and help me. If you want to see which endpoints are currently available you'll find them all here.

License

This project is licensed under the terms of the MIT license. See the LICENSE file.

This project is in no way affiliated with Tesla Inc. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].