-
Notifications
You must be signed in to change notification settings - Fork 19
Create a connector for consuming Restful APIs on Android client #18
Comments
@paulnunezm @paynemiller92 what do you think? |
If version 3 of the Freedomotic API is stable and ready for consumption, I say let's just plug it in and update the app accordingly. Do we have sample requests and responses for each endpoint contained within the API? I definitely say we continue to use Retrofit and my recommendation is that we use RxJava for event and stream handling. |
I'll go with @paynemiller92, Retrofit+RxJava or RxKotlin would be great for this. |
@paynemiller92 @paulnunezm the API is available and all the doc is served by Swagger. So you have to download the last dailybuild from http://teamcity.jetbrains.com/guestAuth/repository/download/bt1177/.lastSuccessful/freedomotic-5.6.0-%7Bbuild.number%7D.zip, run it and point your browser to http://localhost:9111/ |
@mcicolella Thank you for the info! |
@paynemiller92 I just merged your PR. Sorry but our public API demo isn't available. I updated the docs. You need to work with a local installation of Freedomotic. |
@mcicolella That's a bummer. Is there any way we as contributors can get a development environment set up? We really need to have the ability to validate successful and unsuccessful API calls. It would really be unfortunate if every developer had to stand up their own database and connect it to their own unique instance of the Freedomotic API. |
@paynemiller92 I guess is enough just downloading and launch the daily build available here. It starts a local API server responding at port 9111. No hussle in creating any local DB then. |
@p3trur0 At least for me, when I launch the API locally, no data exists, which makes it difficult to create a similar environment that our users will have. Also, it's best to not call localhost from Android apps. Emulators may work, with some tweaking, but physical devices cannot connect to a localhost api. |
@paynemiller92 @mcicolella I know there's a way to test to mock the results for a non-release environment using mockwebserver and retrofit but we still need to know how is the response going to be like to create the models. |
@paynemiller92 @paulnunezm I don't know why you can't access APIs locally. Anyway there is a temporarly online demo at http://104.236.92.231:9111/ |
@paynemiller92 @paulnunezm have you tried the online demo? |
@mcicolella Yes, it appears to be functioning properly! I will start integrating some endpoints. |
@paynemiller92 are you still on this? |
@mcicolella Sorry, took a few months off to due my 9-5 coding obligations! Is this issue still open? |
Yes it is open. |
The interaction with our framework is based on a RESTful API https://github.com/freedomotic/freedomotic/tree/master/plugins/devices/restapi-v3/src/main/java/com/freedomotic/plugins/devices/restapiv3
To try it start Freedomotic and point your browser to http://localhost:9111.
In the first prototype of this client we used Retrofit and Robospice.
They should be updated to the last version and the code properly changed.
Alternatively you can propose a better solution (if so) with the same goal: interacting with our APIs and receiving updates from backend (for example when an object changes its state).
The text was updated successfully, but these errors were encountered: