| [20:48:37] | * cabbage_root has joined #farmos |
| [20:49:45] | * cabbage_root has quit (Client Quit) |
| [08:32:17] | * DennisClicWorld[ has joined #farmos |
| [08:44:08] | * amonteclicworld[ has joined #farmos |
| [08:44:20] | <amonteclicworld[> | Hey |
| [08:44:41] | <amonteclicworld[> | Any help with the FarmOS API |
| [08:45:02] | <mstenta[m]> | Hi amonte@clic.world |
| [08:45:05] | <mstenta[m]> | What are you trying to do? |
| [08:45:22] | <amonteclicworld[> | Hey mstenta |
| [08:45:48] | <amonteclicworld[> | am trying to build an App ontop of Farm os to use it for our Farming community |
| [08:45:57] | <mstenta[m]> | Awesome! |
| [08:46:12] | <mstenta[m]> | Have you checked out the native/client projects that are getting started? |
| [08:46:25] | <mstenta[m]> | https://github.com/farmOS/farmOS-native |
| [08:46:28] | <mstenta[m]> | https://github.com/farmOS/farmOS-client |
| [08:46:34] | <amonteclicworld[> | but i cant see how to work with the given CURL requests |
| [08:47:04] | <mstenta[m]> | What language are you working with? |
| [08:47:15] | <amonteclicworld[> | Android-Java |
| [08:47:19] | <mstenta[m]> | The curl commands are just examples to demonstrate the basic requirements and structure for a request |
| [08:47:36] | <mstenta[m]> | So in Android/Java you would use whatever native HTTP request library is available |
| [08:47:54] | <amonteclicworld[> | I was trying to run via postman but it failed |
| [08:48:02] | <amonteclicworld[> | keeps returning the page |
| [08:48:10] | <mstenta[m]> | `curl` is just a Linux command for doing that in a terminal - but similar tools exist in different languages and frameworks |
| [08:48:24] | <mstenta[m]> | Oh ok |
| [08:48:39] | <amonteclicworld[> | Alright let me try to study the android example |
| [08:49:57] | <amonteclicworld[> | So the wrapper is just a layer |
| [08:50:07] | <mstenta[m]> | The native and client code are written in Javascript, and using Cordova to wrap it in an Android/iOS app |
| [08:50:11] | <amonteclicworld[> | which i can use to access the FarmOS |
| [08:50:13] | <amonteclicworld[> | is that right? |
| [08:50:16] | <mstenta[m]> | So it's not exactly the same as what you are trying to do I think |
| [08:51:08] | <mstenta[m]> | But the basic concepts would be the same |
| [08:51:15] | <amonteclicworld[> | so what do you advise |
| [08:51:58] | <mstenta[m]> | It depends on what you want to do, ultimately |
| [08:52:30] | <mstenta[m]> | It looks like this might be what you want? https://developer.android.com/training/volley/request |
| [08:52:51] | <mstenta[m]> | (But I'm not an Android developer, so I'm not 100% sure...) |
| [08:53:45] | <mstenta[m]> | The client app is simple and focused right now - starting will the ability to add generic observation logs from your phone |
| [08:53:58] | <mstenta[m]> | It works offline, and will sync logs to your farmOS when internet is available |
| [08:54:15] | <mstenta[m]> | So if that is similar to your needs, you may want to give it a try |
| [08:54:33] | <mstenta[m]> | At the very least, you can see what it does, and then look at how it works if that is helpful |
| [08:58:09] | <amonteclicworld[> | Thats alright |
| [08:58:16] | <amonteclicworld[> | and i already have that |
| [08:58:48] | <amonteclicworld[> | but the requests require the cookie data for auth right? |
| [08:59:03] | <amonteclicworld[> | Thats my challenge in http requests |
| [08:59:04] | <jgaehring[m]> | I'm trying to remember, but I think I was getting similar errors in Postman.... might have been alleviated by installing the cors module on the server |
| [08:59:55] | <amonteclicworld[> | jgaehring: i guess but am running it on hosted farmos.net |
| [09:00:24] | <amonteclicworld[> | so running any requests produces nothing |
| [09:00:35] | <amonteclicworld[> | since i cant even login |
| [09:00:41] | <amonteclicworld[> | to get the token |
| [09:00:56] | <amonteclicworld[> | and using https seems i cant store it |
| [09:00:57] | <jgaehring[m]> | i could also be wrong... been a while since i was testing in Postman |
| [09:02:46] | <jgaehring[m]> | yea i've been testing against a local install in a Docker container, mostly |
| [09:05:02] | <jgaehring[m]> | how's your javascript? would it help you to see the AJAX calls in the Cordova app's codebase? |
| [09:05:05] | <jgaehring[m]> | https://github.com/farmOS/farmOS-native/blob/master/src/login/loginModul... |
| [09:05:46] | <amonteclicworld[> | maybe let look into it |
| [09:05:48] | <amonteclicworld[> | thanks |
| [11:26:22] | * cpm has joined #farmos |
| [15:18:55] | * cpm has quit (Quit: Leaving) |