This is a Java wrapper for the EVRYTHNG API v2.x. It lets you use all the features provided by our API with pure Java constructs. You need an API token for authentication which you can get on http://evrythng.net/settings/tokens.
More the Ruby kind of developer? Well look here!
The easiest way is to get the latest .jar
from the Downloads section and adding it to your Java project.
Then, you can directly get started with something like:
// Intialize the wrapper (and providing the API key)
ThngAPIWrapper wrapper = new ThngAPIWrapper(YOUR_EVRYTHNG_TOKEN_HERE);
// Create a Thng
Thng myThng = wrapper.createThng(new Thng("My-TV", "This is my TV.", true, 10.88, 50.56));
[...]
See the example file for a complete overview.
git clone [email protected]:evrythng/evrythng-java-wrapper.git
mvn install
You should now find a .jar
file in the target/
directory.
To build the .jar
with all dependencies run:
mvn assembly:single
To use the wrapper, just add the generated .jar
file located in the target/
directory to your Java project.
Simply open the project by selecting its root folder. The Netbeans Maven plugin does the rest for you!
Simply import the project as a new Maven project (requires m2eclipse
plugin, see http://m2eclipse.sonatype.org/).
Copyright 2012 EVRYTHNG Ltd London / Zurich
The EVRYTHNG API wrapper is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.