sk_api_schema 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +7 -3
- data/VERSION +1 -1
- data/json/v1.0/product.json +48 -1
- data/sk_api_schema.gemspec +2 -2
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -1,17 +1,21 @@
|
|
1
1
|
= SalesKing Api Schema
|
2
2
|
|
3
|
-
SalesKing API description using JSON Schema(http://json-schema.org/)
|
3
|
+
SalesKing API description using JSON Schema(http://json-schema.org/). A schema
|
4
|
+
describes the resource in terms of available fields, CRUD actions and
|
5
|
+
relationships with other resources.
|
4
6
|
|
5
7
|
For ruby users this project provides a gem with some basic utility functions
|
6
8
|
besides the schema. Other languages can take advantage of the raw json files.
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
+
== TODO
|
11
|
+
|
12
|
+
The urls in the link sections, need some love, so please don't rely on them right now
|
10
13
|
|
11
14
|
== Notice:
|
12
15
|
|
13
16
|
This gem is used actively by SalesKing to deliver it's api resources BUT commits
|
14
17
|
and changes in here might not be directly reflected.
|
18
|
+
|
15
19
|
The gem version does not reflect the api version. The version, for now, is keept
|
16
20
|
in the folder-name and as long as there are no major changes(breaking backwards
|
17
21
|
compatibility), the version number will remain.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.11
|
data/json/v1.0/product.json
CHANGED
@@ -48,6 +48,53 @@
|
|
48
48
|
"team_id":{
|
49
49
|
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
50
50
|
"type":"string"
|
51
|
+
},
|
52
|
+
"lock_version": {
|
53
|
+
"description": "Increased on every edit, so SK can detect/prevent a concurrent edit by another user. First save wins.",
|
54
|
+
"type":"integer"
|
55
|
+
}
|
56
|
+
},
|
57
|
+
"links":[
|
58
|
+
{ "rel": "self",
|
59
|
+
"href": "products/{id}"
|
60
|
+
},
|
61
|
+
{ "rel": "instances",
|
62
|
+
"href": "products",
|
63
|
+
"properties" : {
|
64
|
+
"page":{
|
65
|
+
"title" : "Page",
|
66
|
+
"description": "In paginated results set the page to look for",
|
67
|
+
"type":"number"
|
68
|
+
},
|
69
|
+
"filter[q]":{
|
70
|
+
"title" : "Search",
|
71
|
+
"description": "Searches in number, name, description, price",
|
72
|
+
"type":"string"
|
73
|
+
},
|
74
|
+
"sort_by":{
|
75
|
+
"title" : "Sort by",
|
76
|
+
"description": "Sort the results by the given field => number",
|
77
|
+
"enum":['name','number','price', 'created_at', 'updated_at'],
|
78
|
+
"type": 'string'
|
79
|
+
},
|
80
|
+
"sort":{
|
81
|
+
"title" : "Sort",
|
82
|
+
"enum":["ASC","DESC"],
|
83
|
+
"description": "Sort the results in ASC or DESC"
|
84
|
+
}
|
85
|
+
}
|
86
|
+
},
|
87
|
+
{ "rel": "destroy",
|
88
|
+
"href": "products/{id}",
|
89
|
+
"method": "DELETE"
|
90
|
+
},
|
91
|
+
{ "rel": "update",
|
92
|
+
"href": "products/{id}",
|
93
|
+
"method": "PUT"
|
94
|
+
},
|
95
|
+
{ "rel": "create",
|
96
|
+
"href": "products",
|
97
|
+
"method": "POST"
|
51
98
|
}
|
52
|
-
|
99
|
+
]
|
53
100
|
}
|
data/sk_api_schema.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sk_api_schema}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.11"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Georg Leciejewski"]
|
12
|
-
s.date = %q{2011-01-
|
12
|
+
s.date = %q{2011-01-25}
|
13
13
|
s.description = %q{SalesKing API JSON schema and utility methods}
|
14
14
|
s.email = %q{gl@salesking.eu}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sk_api_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 11
|
10
|
+
version: 0.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Georg Leciejewski
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-25 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|