Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

try imageurl table

  • Loading branch information...
commit 3ce60cb0f906d60e8e8308637a425ce38601e203 1 parent ea1a600
@spier spier authored
Showing with 43 additions and 1 deletion.
  1. +42 −0 wefeelfine/wefeelfine.imageurl.xml
  2. +1 −1  wefeelfine/wefeelfine.xml
View
42 wefeelfine/wefeelfine.imageurl.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Sebastian Spier (http://twitter.com/#!/sebastianspier/)</author>
+ <description>API lets you query "feelings" as collected by www.wefeelfine.org</description>
+ <documentationURL>http://www.wefeelfine.org/api.html</documentationURL>
+ <sampleQuery description="Give me the most recent 50 sentences">SELECT sentence FROM wefeelfine WHERE count=50</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath="" produces="XML">
+ <urls>
+ <url>http://api.wefeelfine.org:8080/ShowFeelings</url>
+ </urls>
+ <inputs>
+ <key id="postdate" type="xs:string" paramType="variable"/>
+ <key id="imageid" type="xs:string" paramType="variable"/>
+ <key id="imagesize" type="xs:string" paramType="variable"/>
+ </inputs>
+
+ <!-- test of setting the caching time -->
+ <execute>
+ <![CDATA[
+ var imgpath = "http://images.wefeelfine.org/data/images/";
+ imgpath += postdate.replace('-','/');
+ imgpath += "/"+imageid;
+
+ if(imagesize == "thumb") {
+ imgpath += "_thumb.jpg";
+ }
+ else {
+ imgpath += "_full.jpg";
+ }
+
+ y.log(imgpath);
+ ]]>
+ </execute>
+ </select>
+ </bindings>
+</table>
+
+
+
View
2  wefeelfine/wefeelfine.xml
@@ -16,7 +16,7 @@
returnfields – comma delimited list of all the data you want to get back. Options are:
imageid (used to get images)
- feeling (sad, depressed, happy, etc. – full list of valid feelings is here)
+ feeling (sad, depressed, happy, etc. – full list of valid feelings at http://www.wefeelfine.org/data/files/feelings.txt)
sentence (the full sentence that went with the feeling)
posttime (epoch timestamp of the time the post was scraped)
postdate (YYYY-MM-DD of the day the post was scraped)
Please sign in to comment.
Something went wrong with that request. Please try again.