Skip to content

dravenk/webthing-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

30ee7c0 · Mar 25, 2024

History

59 Commits
Apr 19, 2022
Apr 18, 2022
Jun 3, 2021
Mar 5, 2020
Aug 16, 2020
Sep 18, 2019
Mar 25, 2024
Apr 18, 2022
Jun 3, 2021
Apr 18, 2022
Apr 18, 2022
Sep 16, 2019
Apr 18, 2022
Jun 3, 2021
Jun 3, 2021
Apr 18, 2022
Jun 3, 2021
Apr 19, 2022
Apr 19, 2022
Apr 19, 2022
Apr 18, 2022
Sep 25, 2019

Repository files navigation

Web of Things


GitHub forks GitHub version GoDoc Codacy Badge travis Go Report Card codebeat badge Build Status

USAGE

This library fully supports Web Thing REST API.You can start building your Web of Thing by looking at single-thing.

Download and import

This package name is called webthing. This project is called webthing-go to keep the naming consistent with the implementation of other languages. You just need to import this package the way golang normally imports a package.

go get -u -v github.com/dravenk/webthing-go
import (
 "github.com/dravenk/webthing-go"
)

Create Thing

// Create a Lamp.
thing := webthing.NewThing("urn:dev:ops:my-thing-1234",
 "Lamp",
 []string{"OnOffSwitch", "Light"},
 "A web connected thing")

For more information on Creating Webthing, please check the wiki Create-Thing

Example

cd $GOPATH/src/github.com/dravenk/webthing-go
go run examples/single-thing/single-thing.go

You can also run a sample with docker:

docker run -ti --name single-thing -p 8888:8888 dravenk/webthing

For more information on Run Example, please check the wiki Run-Example

RESOURCES