Local food & farmers' market REST API

"and a new day will dawn; for those who stand long"- stairway to heaven

We are totally excited to announce @homecookme API!  Search by food items, get details on a farmers' market or on a local business.  This is our contribution to the local food and farmers' market developer community. From this data, we can build many applications.

The API is implemented using REST framework and the results are returned in JSON.  Our customers can build mobile and web applications using our unique data which contains relationship between farmers' markets, vendors and the products they sell.  

For example:

Search for food:
http://www.homecook.me/api/search?search=food
[{"class":"Users","id":1,"aboutMe":"Please contact us today at bilal@mytweetmark.com for any questions!","autoTweet":null,"backgroundUrl":"http://a1.twimg.com/profile_background_images/298837507/homecookme-mobile-app.jpg","blog":"http://www.homecook.me","businessAddress":"Concord, CA","businessName":"mytweetmark","businessPhone":"(925) 969-0494","color":"FFFFDF","countryId":1,"createTime":"2010-04-
...
...
...
Returns local business that contain the term food in their profile fields.

For example,

users[0].userName = Returns beckmannsbakery

class Users implements Serializable {
static searchable = true
Long id
String userName
String password
String email
Integer status
Integer marketingId
Integer countryId
Date createTime
Date updateTime
String ipAddress
Integer numCategories
String firstName
String lastName
Date lastLogin
Integer loginTimes
String profilePhoto
Integer tweet
String token
String tokenSecret
String facebookUid
Integer permission
Integer autoTweet
String website
String blog
String color
String aboutMe
Integer followersCount
Integer friendsCount
String businessName
String businessAddress
String businessPhone
String facebookProfile
String backgroundUrl
byte[] oauthObj 
}

Search for local business by name:
http://www.homecook.me/api/biz?biz=beckmannsbakery
{"class":"Users","id":95,"aboutMe":"We sell breads, pastries and pies in your local California farmers markets.  Please come find us today in over 40 locations  ","autoTweet":null,"backgroundUrl":"http://a2.twimg.com/profile_background_images/274493898/BeckNewTwitterLower_nologoPSD.jpg","blog":null,"businessAddress":"104 Bronson St #6","businessName":"beckmann's bakery","businessPhone":"831-423-9242","color":"FFEFEF","countryId":1,"createTime":"2010-07-21T23:17:48Z","email":"tstumbaugh@beckmannsbakery.com","facebookProfile":null,"facebookUid":null,"firstName":"Peter","followersCount":270,"friendsCount":225,"ipAddress":null,"lastLogin":"2010-07-
...
...
...
Returns local business and all the farmers' markets they belong.  Also the products they sell.

For example,

users[0].farmerMarket.title = Returns title of the market.
users[0].product.name = Returns name of the product.

class FarmerMarket {
Integer id
String title
Integer status
Date createTime
String marketPhoto
String address
String city
String state
String description
String timings
String marketAdmin
String googleMap
String facebookLike
}

class Product {
static searchable = true
Long id
Long userId
Integer status
Date createTime
String name
String price
String quantity
Date updateTime
}

Search for local farmers' market by id:
http://www.homecook.me/api/market?marketId=22
{"class":"FarmerMarket","id":22,"address":"1700 W. Hillsdale Blvd. ","city":"San Mateo","createTime":"2010-07-22T18:47:49Z","description":"This farmers market is operated by pacific coast farmers market association www.pcfma.com/market_home.php?market_id=15","facebookLike":"<iframe src=\"http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2FSanLeandroFarmersMarket%3Fref%3Dsearch%23%21%2Fpages%2FDowntown-San-Mateo-Farmers-Market%2F128414687202114%3Fref%3Dts&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=dark&amp;height=80\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:450px; height:80px;\" allowTransparency=\"true\"><\/iframe>","googleMap":"http://maps.google.com/maps/api/staticmap?
...
...
...
Returns all the businesses that sell within the market.

See Users class above for results.

Search for local farmers' markets:
http://www.homecook.me/api/markets?searchMarket=San

Search for local farmers' markets product (item):
http://www.homecook.me/api/product?productId=10

Search for local farmers' markets products by userId:
http://www.homecook.me/api/userProduct?userId=96

Search for local farmers' markets by userId:
http://www.homecook.me/api/userMarket?userId=96

We will continue to add more features to our API.  Please feel free to ask any questions, bilal@mytweetmark.com.

Happy coding!


 

What did you think of this article?




Trackbacks
  • No trackbacks exist for this post.
Comments
  • No comments exist for this post.
Leave a comment

Submitted comments are subject to moderation before being displayed.

 Name

 Email (will not be published)

 Website

Your comment is 0 characters limited to 3000 characters.