Created
June 21, 2013 11:23
-
-
Save smulube/5830587 to your computer and use it in GitHub Desktop.
xively datapoints tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xively | |
import datetime | |
FEED_ID=123 | |
API_KEY="123abc" | |
api = xively.XivelyAPIClient(API_KEY) | |
feed = api.feeds.get(FEED_ID) | |
now = datetime.datetime.now() | |
for d in feed.datastreams.list(): | |
points = d.datapoints.history(end=now, duration='3hours', interval=0) | |
list(points) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment