Need help understanding Smartthings REST API - php

I've been trying to create an app which does pretty much the same thing smartthings app does with some additional functionalities. But I've struggled to understand their documentations and terminologies. I've tried to illustrate my intentions below:
However their illustration is as follows:
My questions are as follows:
What do they mean by Third party Cloud? Is it same as My API Server?
What is smartapps? Are they kind of programs to define capabilities of a device? If yes, how can we create it using API instead of Groovy program.
How is Locations, SmartApps and Devices related to each other?
How do we communicate to hub connected devices? In other words, How does My API Server know about the state changes in the device? Is webhooks used here?

Related

I am using Laravel in order to make a DBMS for a social network. I need it to make an app. can anyone tell me how? i cant find anything on google

Using Laravel for PHP and DBMS. How do I make an app? (for social networking).
I have googled most of the things but I am really an Amateur and need help.
There are many kinds of apps, so before you start to work on your app, you need to carefully determine what exactly you need. You could write desktop apps for various operating systems, or native mobile apps, or hybrids, or a web application... You name it. Anyway, Laravel is the server-side and it should be as agnostic to the apps as possible. You need to create an API and handle the following things:
CRUD for the database
session (log in, log out, register, password change, user settings)
logical API functions
file transfer protocol usage
push notification (if needed)
As per your requirements, you will need to implement the server-side API in Laravel, which is a PHP-based framework and use an RDBMS, which could be MySQL, SQL Server, Oracle, or a NoSQL database, for instance MongoDB.
Before you implement any apps, you should have a proof-of-concept for the API. You should not invest too much time working out the details of the API, as when you are going to work on a real app, you will notice things to be changed anyway. The API should be accompanied by a playground for testing, maybe a very small app without design where you could send requests to the API. Or you can implement a WebSocket API to have a single, duplex connection. It is up to you.
As about how to write an API, there are many tutorials.

iOS/Android application with server API's to pass information

I'm working on project for iOS/ Android application that allow user to Register/Login and than create/share and store files to the server and share it with other users.
To meet this purpose i been following this tutorial: http://www.raywenderlich.com/2941/how-to-write-a-simple-phpmysql-web-service-for-an-ios-app but i found its very basic and i need more information before i start working on it.
My question is, how to create an application for example like Path: https://path.com or instagram, that allow apps to sync with server using API's and pass data between server, phone and users without offering Website to users?
Is there any pre-built open source php/mysql API's that we can use for this purpose?
Any brief tutorial that explain steps to do this (since until now i use to work on basic iOS app and need not require any interaction to server and stuff)?
In project im using php/mysql, in my research i found people also advice to use AFnetworking (http://afnetworking.com/) to replace stranded url fetching, any opinion on that?
I'm hoping to have great discussion on this question since there is lot of questions out there on this topic but non have full descriptive answers!
you can create our own server using tomcat and get the path that act as url for you..and there are many third party framework available for parsing or in iphone they have there own using NSJSONSerialization.you can read the detail from this link.
http://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html

Access a webservice from a BlackBerry app

I have no idea how to access a PHP based WebService from a BlackBerry.
Can anybody guide me in accessing one?
Your options are either use a proper API interface as suggested by snowflake (like REST, JSON/XML RPC etc.) or to scrape the HTML (very painful -- especially on mobile devices). The language in which the service is implemented shouldn't matter. If you are targeting OS6, there is a new communication API that makes consuming webservices easier (A sample can be found at http://devblog.blackberry.com/2011/01/communication-api-2/), but it's not too difficult on OS5 or below either. If you need to use JSON in OS5, your can find the org.me.json package online and use that.
If the webservice is under your control, you should add RPC support, the difficulty of which depends on the framework (if any) you're using for your project. Your question's a little scant on that information, so I can't provide any specific details.
See this Web Services in BlackBerry J2ME Application article. Here clearly described how to use Web services in Blackberry. And also you can refer Web services overview documentation.

How should I make my PHP API work for an iPhone app

The title may not be the best way to describe my question.
I am working on another social network type site similar to a facebook site in PHP. I would like to eventually pay someone to build me an iPhone/iOS app that will be similar to the facebook iPhone app but work with my PHP site instead.
So a major concern for me will be to have the iOS app to be as fast as possible for the users.
From others experience, what would be the best way for my PHP sites API to get the data for the iOS app? I would think that a simple REST type API that returns results with JSON and XML formats would be the way most sites work with an iPhone/iOS app?
Is my theory correct or is there a different way to do it? Please help
Yes, that's the best solution. The only alternative I know of would be to connect with via TCP/IP, and skip the higher level HTTP protocol. That means using sockets.

Which is the best feasible solution for sharing the data from the database?

here is my scenario, i am building a web application using PHP and MySQL. basically it is a real estate application. where i would like to share the data among several other platforms and devices, here is i what i intend to do
a) building the web app to be used with the browser using PHP, MySQL, and AJAX. (this will be my server)
b) extend the support and build a desktop application using POKKI.
c) extend the support and build an application for Androids and iOS devices.
d) all data transaction for the app should take place from the web server.
e) basically it will be server client application . where the server will be my web server and the clients will be iOS app, Android App Pokki etc.
i am not a hardcore programmer, although it has been more then 1 year since i started using PHP, and i do understand it to my use. i would like to know the best feasible solution on how to share the data among the different clients(POKKI, iOS App, Android App).
i would like to know.
a) do i have to connect to database directly from the client and access the data? is it possible? is it bad if i go this way?
b) do i have to create a public class with api sign up process? what would be the real scenario if i would like it to make it cross platform.
A Humble request to all of you to guide me on how does this things works. any articles, resources, links that can prove useful to me will also be appreciated.
thank you.
I think you should create an API which allows you to access the database strictly as you want it. Look at the twitter API for example and see how it allows third parties to access their data using simple requests.
So your site uses the DB directly where as all other applications you want to make will use the API ( which runs on ur web server)
This would allow you with the flexibility to have control who gets access and who doesnt ( only your own apps or even third parties etc etc) and allows you to build kick-ass applications without putting your actual database at risk.
Hope this helps!
1 - you should not allow client to access data directly - bad.
2 - sign up are easy with open id, let google or any other openid provider handle authentication, you deal with your own clean code without worrying about auth.
http://code.google.com/apis/accounts/docs/OpenID.html
You can create xml api and share the data from your server.
On different type of client you can eaisly parse the xml data and process it or show it.
In xml API if you want the restrict access then your can provide the restriction.
Please let me know if you have any issue
Thanks and Regards,
Ankur K Singh
take a look into getfrapi.com for building API.

Categories