Strict Standards: Declaration of action_plugin_wrap::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /homepages/14/d154513924/htdocs/developer.seasonsapp.com/wiki/lib/plugins/wrap/action.php on line 13

Warning: Cannot modify header information - headers already sent by (output started at /homepages/14/d154513924/htdocs/developer.seasonsapp.com/wiki/lib/plugins/wrap/action.php:13) in /homepages/14/d154513924/htdocs/developer.seasonsapp.com/wiki/inc/auth.php on line 339

Warning: Cannot modify header information - headers already sent by (output started at /homepages/14/d154513924/htdocs/developer.seasonsapp.com/wiki/lib/plugins/wrap/action.php:13) in /homepages/14/d154513924/htdocs/developer.seasonsapp.com/wiki/inc/actions.php on line 162
documentation:resource-reference – Seasons API Documentation

Resource Reference


All resources linked to each other to allow easy navigation through the data without assembling all urls on your own. Currently there are resource types for categories and crops.
The returned result can either be a collection or a single resource. Collections contain a list of single resources.

http://api.seasonsapp.com/categories - Returns a collection of categories http://api.seasonsapp.com/categories/1 - Returns a single category

Categories


All crops are categorized in one category.

XML


<category>
	<id>1</id>
	<name>Fruits</name>
	<lang>en</lang>
	<crops_count>51</crops_count>
	<link href="http://api.seasonsapp.com/categories/1" rel="self" type="application/xml" />
	<link href="http://api.seasonsapp.com/crops/categories/1" rel="crops" type="application/xml" title="Crops" />
</category>


JSON


{
	"category":{
		"id":"1",
		"name":"Fruits",
		"lang":"en",
		"crops_count":"51",
		"links":[
			{
				"href":"http://api.seasonsapp.com/categories/1",
				"rel":"self"
			},
			{
				"href":"http://api.seasonsapp.com/crops/categories/1",
				"rel":"crops"
			}
		]
	}
}


Crops


Crops are data about the actual cultivated plants and their seasonal data.

XML


<crop>
	<id>1</id>
	<name>Apple</name>
	<description>Apple</description>
	<lang>en</lang>
	<category>
		<id>1</id>
		<link href="http://api.seasonsapp.com/categories/1" rel="self" />
	</category>
	<image>
		<url>http://api.seasonsapp.com/example/image.jpg"</url>
	</image>
	<seasons>
		<season>
			<type>import</type>
			<start>2010-10-01</start>
			<end>2011-02-15</end>
		</season>
	</seasons>
	<link href="http://api.seasonsapp.com/crops/1" rel="self" />
</crop>


JSON


{
	"crop":{
		"id":"1",
		"category":{
			"id":"1",
			"link":{
				"href":"http://api.seasonsapp.com/categories/1",
				"rel":"self"
			},
		},
		"name":"Apple",
		"description":"Apples are delicous",
		"lang":"en",
		"image":{
			"url:"http://api.seasonsapp.com/images/apple.jpg"
			},
		"seasons":[
			{
				"start":"2010-07-01",
				"end":"2010-11-15",
				"type":"local"
			},
			{
				"start":"2010-05-01",
				"end":"2011-02-15",
				"type":"import"
			}
		],
		"links":[
			{
				"href":"http://api.seasonsapp.com/crops/1",
				"rel":"self"
			}
		]
	}
}
documentation/resource-reference.txt · Last modified: 2010/10/28 01:28 (external edit)
Trace: resource-reference