odata 0.3.2 → 0.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 899ee301dd62dc8969c8a8d8191adc586b287527
4
- data.tar.gz: 9d9122c36019cfa78a3e4567b9739e8353b07db3
3
+ metadata.gz: dfcfb15f804fca66b30e664860a33a1b7f3cf4ac
4
+ data.tar.gz: 1d91e95f9b75f8c0b463dca6fd2a1067a1b35064
5
5
  SHA512:
6
- metadata.gz: 422c217129c1f82e13d3641d8468cc3ff6bc65224db8da0c17cc1e1c1c012d093e1b5e0f891c48224088f1ae01fa132b89e6bb5edc44b8c4c3b3663e88792023
7
- data.tar.gz: 262866a54904f052099030cf1393359b2e9ba7dd06fc4bfbd56a18ea004ba6262fcc6994ea2383b175abe0d01225785661556e2dc24ec2c45695b5d91316f7f2
6
+ metadata.gz: e9b7873e447d44334dc0d9aaa69cc9be08e4d216de3ced58d4ed161417e8c3ebb932084ff68c303569d766216ce12024dd12094e20fa8d59f00dadc446647c72
7
+ data.tar.gz: 3f0c963f4f24887243ecc79442dfd868f9b71954b1ebd6c53a0ffd3aa9f7957a2e5035b1f108b7ab6553a73c2e094bf682836bcba5041c15aa1515a65ff1ff9b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.4.0
4
+
5
+ * Added OData::Query#execute to run query and return a result.
6
+ * Added OData::Query::Result to handle enumeration of query results.
7
+
3
8
  ## 0.3.2
4
9
 
5
10
  * Refactored internals of the query interface.
data/README.md CHANGED
@@ -97,6 +97,29 @@ ready to save back to the service or `OData::EntitySet`, which you do like so:
97
97
  svc['Products'] << product # Write back to the service
98
98
  products << product # Write back to the Entity Set
99
99
 
100
+ ### Queries
101
+
102
+ `OData::Query` instances form the base for finding specific entities within an
103
+ `OData::EntitySet`. A query object exposes a number of capabilities based on
104
+ the [System Query Options](http://www.odata.org/documentation/odata-version-3-0/odata-version-3-0-core-protocol#queryingcollections)
105
+ provided for in the OData specification. Below is just a partial example of
106
+ what is possible:
107
+
108
+ query = svc['Products'].query
109
+ query.where(query[:Price].lt(15))
110
+ query.where(query[:Rating].gt(3))
111
+ query.limit(3)
112
+ results = query.execute
113
+ results.each {|product| puts product['Name']}
114
+
115
+ The process of querying is kept purposely verbose to allow for lazy behavior to
116
+ be implemented at higher layers. Internally, `OData::Query` relies on the
117
+ `OData::Query::Criteria` for the way the `where` method works. You should refer
118
+ to the published RubyDocs for full details on the various capabilities:
119
+
120
+ * [OData::Query](http://rubydoc.info/github/ruby-odata/odata/master/OData/Query)
121
+ * [OData::Query::Criteria](http://rubydoc.info/github/ruby-odata/odata/master/OData/Query/Criteria)
122
+
100
123
  ## Contributing
101
124
 
102
125
  1. Fork it ( https://github.com/[my-github-username]/odata/fork )
data/lib/odata/entity.rb CHANGED
@@ -109,6 +109,10 @@ module OData
109
109
  service.primary_key_for(name)
110
110
  end
111
111
 
112
+ def is_new?
113
+ self[primary_key].nil?
114
+ end
115
+
112
116
  private
113
117
 
114
118
  def get_property_class(property_name)
@@ -82,8 +82,6 @@ module OData
82
82
  OData::Query.new(self)
83
83
  end
84
84
 
85
-
86
-
87
85
  # Find the Entity with the supplied key value.
88
86
  # @param key [to_s] primary key to lookup
89
87
  # @return [OData::Entity,nil]
@@ -97,38 +95,25 @@ module OData
97
95
  # @param entity [OData::Entity] entity to save or update in the service
98
96
  # @return [OData::Entity]
99
97
  def <<(entity)
100
- new_entity = entity[entity.primary_key].nil?
101
-
102
- url_chunk = name
103
- url_chunk += "(#{entity[entity.primary_key]})" unless new_entity
104
-
105
- options = {
106
- method: :post,
107
- body: entity.to_xml.gsub(/\n\s+/, ''),
108
- headers: {
109
- 'Accept' => 'application/atom+xml',
110
- 'Content-Type' => 'application/atom+xml'
111
- }
112
- }
113
-
114
- result = service.execute(url_chunk, options)
115
- if result.code.to_s =~ /^2[0-9][0-9]$/
116
- if new_entity
117
- doc = ::Nokogiri::XML(result.body).remove_namespaces!
118
- entity[entity.primary_key] = doc.xpath("//content/properties/#{entity.primary_key}").first.content
119
- end
120
- else
121
- raise StandardError, 'Something went wrong committing your entity'
98
+ url_chunk, options = setup_entity_post_request(entity)
99
+ result = execute_entity_post_request(options, url_chunk)
100
+ if entity.is_new?
101
+ doc = ::Nokogiri::XML(result).remove_namespaces!
102
+ entity[entity.primary_key] = doc.xpath("//content/properties/#{entity.primary_key}").first.content
122
103
  end
123
104
  entity
124
105
  end
125
106
 
126
- private
127
-
107
+ # The OData::Service this EntitySet is associated with.
108
+ # @return [OData::Service]
109
+ # @api private
128
110
  def service
129
111
  @service ||= OData::ServiceRegistry[namespace]
130
112
  end
131
113
 
114
+ # Options used for instantiating a new OData::Entity for this set.
115
+ # @return [Hash]
116
+ # @api private
132
117
  def entity_options
133
118
  {
134
119
  namespace: namespace,
@@ -136,6 +121,8 @@ module OData
136
121
  }
137
122
  end
138
123
 
124
+ private
125
+
139
126
  def get_paginated_entities(per_page, page)
140
127
  query = OData::Query.new(self)
141
128
  query.include_count.skip(per_page * page).limit(per_page)
@@ -144,5 +131,26 @@ module OData
144
131
  total = service.find_node(result, 'count').content.to_i
145
132
  return total, entities
146
133
  end
134
+
135
+ def execute_entity_post_request(options, url_chunk)
136
+ result = service.execute(url_chunk, options)
137
+ unless result.code.to_s =~ /^2[0-9][0-9]$/
138
+ raise StandardError, 'Something went wrong committing your entity'
139
+ end
140
+ result.body
141
+ end
142
+
143
+ def setup_entity_post_request(entity)
144
+ chunk = entity.is_new? ? name : "#{name}(#{entity[entity.primary_key]})"
145
+ options = {
146
+ method: :post,
147
+ body: entity.to_xml.gsub(/\n\s+/, ''),
148
+ headers: {
149
+ 'Accept' => 'application/atom+xml',
150
+ 'Content-Type' => 'application/atom+xml'
151
+ }
152
+ }
153
+ return chunk, options
154
+ end
147
155
  end
148
156
  end
@@ -0,0 +1,39 @@
1
+ module OData
2
+ class Query
3
+ # Represents the results of executing a OData::Query.
4
+ # @api private
5
+ class Result
6
+ include Enumerable
7
+
8
+ # Initialize a result with the query and the result.
9
+ # @param query [OData::Query]
10
+ # @param result [Typhoeus::Result]
11
+ def initialize(query, result)
12
+ @query = query
13
+ @result = result
14
+ end
15
+
16
+ # Provided for Enumerable functionality
17
+ # @param block [block] a block to evaluate
18
+ # @return [OData::Entity] each entity in turn for the query result
19
+ def each(&block)
20
+ service.find_entities(result).each do |entity_xml|
21
+ entity = OData::Entity.from_xml(entity_xml, entity_options)
22
+ block_given? ? block.call(entity) : yield(entity)
23
+ end
24
+ end
25
+
26
+ private
27
+
28
+ attr_reader :query, :result
29
+
30
+ def service
31
+ query.entity_set.service
32
+ end
33
+
34
+ def entity_options
35
+ query.entity_set.entity_options
36
+ end
37
+ end
38
+ end
39
+ end
data/lib/odata/query.rb CHANGED
@@ -89,12 +89,22 @@ module OData
89
89
  [entity_set.name, assemble_criteria].compact.join('?')
90
90
  end
91
91
 
92
- private
92
+ # Execute the query.
93
+ # @return [OData::Query::Result]
94
+ def execute
95
+ response = entity_set.service.execute(self.to_s)
96
+ OData::Query::Result.new(self, response)
97
+ end
93
98
 
99
+ # The EntitySet for this query.
100
+ # @return [OData::EntitySet]
101
+ # @api private
94
102
  def entity_set
95
103
  @entity_set
96
104
  end
97
105
 
106
+ private
107
+
98
108
  def criteria_set
99
109
  @criteria_set
100
110
  end
data/lib/odata/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module OData
2
- VERSION = '0.3.2'
2
+ VERSION = '0.4.0'
3
3
  end
data/lib/odata.rb CHANGED
@@ -14,6 +14,7 @@ require 'odata/properties'
14
14
  require 'odata/entity'
15
15
  require 'odata/entity_set'
16
16
  require 'odata/query/criteria'
17
+ require 'odata/query/result'
17
18
  require 'odata/query'
18
19
  require 'odata/service'
19
20
  require 'odata/service_registry'
@@ -0,0 +1,425 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://services.odata.org/OData/OData.svc/$metadata
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Typhoeus - https://github.com/typhoeus/typhoeus
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Cache-Control:
18
+ - no-cache
19
+ Content-Length:
20
+ - '10034'
21
+ Content-Type:
22
+ - application/xml;charset=utf-8
23
+ Server:
24
+ - Microsoft-IIS/8.0
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ DataServiceVersion:
28
+ - 3.0;
29
+ X-AspNet-Version:
30
+ - 4.0.30319
31
+ X-Powered-By:
32
+ - ASP.NET
33
+ Access-Control-Allow-Origin:
34
+ - "*"
35
+ Access-Control-Allow-Methods:
36
+ - GET
37
+ Access-Control-Allow-Headers:
38
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
39
+ Access-Control-Expose-Headers:
40
+ - DataServiceVersion
41
+ Set-Cookie:
42
+ - ARRAffinity=a9aad020fb0149d28d0efdb1e8bab24ad3481a904c8fb94abced8813c01ee265;Path=/;Domain=services.odata.org
43
+ Date:
44
+ - Sun, 20 Jul 2014 21:16:25 GMT
45
+ body:
46
+ encoding: UTF-8
47
+ string: <?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"><edmx:DataServices
48
+ m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><Schema
49
+ Namespace="ODataDemo" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"><EntityType
50
+ Name="Product"><Key><PropertyRef Name="ID" /></Key><Property Name="ID" Type="Edm.Int32"
51
+ Nullable="false" /><Property Name="Name" Type="Edm.String" m:FC_TargetPath="SyndicationTitle"
52
+ m:FC_ContentKind="text" m:FC_KeepInContent="false" /><Property Name="Description"
53
+ Type="Edm.String" m:FC_TargetPath="SyndicationSummary" m:FC_ContentKind="text"
54
+ m:FC_KeepInContent="false" /><Property Name="ReleaseDate" Type="Edm.DateTime"
55
+ Nullable="false" /><Property Name="DiscontinuedDate" Type="Edm.DateTime" /><Property
56
+ Name="Rating" Type="Edm.Int16" Nullable="false" /><Property Name="Price" Type="Edm.Double"
57
+ Nullable="false" /><NavigationProperty Name="Categories" Relationship="ODataDemo.Product_Categories_Category_Products"
58
+ ToRole="Category_Products" FromRole="Product_Categories" /><NavigationProperty
59
+ Name="Supplier" Relationship="ODataDemo.Product_Supplier_Supplier_Products"
60
+ ToRole="Supplier_Products" FromRole="Product_Supplier" /><NavigationProperty
61
+ Name="ProductDetail" Relationship="ODataDemo.Product_ProductDetail_ProductDetail_Product"
62
+ ToRole="ProductDetail_Product" FromRole="Product_ProductDetail" /></EntityType><EntityType
63
+ Name="FeaturedProduct" BaseType="ODataDemo.Product"><NavigationProperty Name="Advertisement"
64
+ Relationship="ODataDemo.FeaturedProduct_Advertisement_Advertisement_FeaturedProduct"
65
+ ToRole="Advertisement_FeaturedProduct" FromRole="FeaturedProduct_Advertisement"
66
+ /></EntityType><EntityType Name="ProductDetail"><Key><PropertyRef Name="ProductID"
67
+ /></Key><Property Name="ProductID" Type="Edm.Int32" Nullable="false" /><Property
68
+ Name="Details" Type="Edm.String" /><NavigationProperty Name="Product" Relationship="ODataDemo.Product_ProductDetail_ProductDetail_Product"
69
+ ToRole="Product_ProductDetail" FromRole="ProductDetail_Product" /></EntityType><EntityType
70
+ Name="Category" OpenType="true"><Key><PropertyRef Name="ID" /></Key><Property
71
+ Name="ID" Type="Edm.Int32" Nullable="false" /><Property Name="Name" Type="Edm.String"
72
+ m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text" m:FC_KeepInContent="true"
73
+ /><NavigationProperty Name="Products" Relationship="ODataDemo.Product_Categories_Category_Products"
74
+ ToRole="Product_Categories" FromRole="Category_Products" /></EntityType><EntityType
75
+ Name="Supplier"><Key><PropertyRef Name="ID" /></Key><Property Name="ID" Type="Edm.Int32"
76
+ Nullable="false" /><Property Name="Name" Type="Edm.String" m:FC_TargetPath="SyndicationTitle"
77
+ m:FC_ContentKind="text" m:FC_KeepInContent="true" /><Property Name="Address"
78
+ Type="ODataDemo.Address" /><Property Name="Location" Type="Edm.GeographyPoint"
79
+ SRID="Variable" /><Property Name="Concurrency" Type="Edm.Int32" ConcurrencyMode="Fixed"
80
+ Nullable="false" /><NavigationProperty Name="Products" Relationship="ODataDemo.Product_Supplier_Supplier_Products"
81
+ ToRole="Product_Supplier" FromRole="Supplier_Products" /></EntityType><ComplexType
82
+ Name="Address"><Property Name="Street" Type="Edm.String" /><Property Name="City"
83
+ Type="Edm.String" /><Property Name="State" Type="Edm.String" /><Property Name="ZipCode"
84
+ Type="Edm.String" /><Property Name="Country" Type="Edm.String" /></ComplexType><EntityType
85
+ Name="Person"><Key><PropertyRef Name="ID" /></Key><Property Name="ID" Type="Edm.Int32"
86
+ Nullable="false" /><Property Name="Name" Type="Edm.String" /><NavigationProperty
87
+ Name="PersonDetail" Relationship="ODataDemo.Person_PersonDetail_PersonDetail_Person"
88
+ ToRole="PersonDetail_Person" FromRole="Person_PersonDetail" /></EntityType><EntityType
89
+ Name="Customer" BaseType="ODataDemo.Person"><Property Name="TotalExpense"
90
+ Type="Edm.Decimal" Nullable="false" /></EntityType><EntityType Name="Employee"
91
+ BaseType="ODataDemo.Person"><Property Name="EmployeeID" Type="Edm.Int64" Nullable="false"
92
+ /><Property Name="HireDate" Type="Edm.DateTime" Nullable="false" /><Property
93
+ Name="Salary" Type="Edm.Single" Nullable="false" /></EntityType><EntityType
94
+ Name="PersonDetail"><Key><PropertyRef Name="PersonID" /></Key><Property Name="PersonID"
95
+ Type="Edm.Int32" Nullable="false" /><Property Name="Age" Type="Edm.Byte" Nullable="false"
96
+ /><Property Name="Gender" Type="Edm.Boolean" Nullable="false" /><Property
97
+ Name="Phone" Type="Edm.String" /><Property Name="Address" Type="ODataDemo.Address"
98
+ /><Property Name="Photo" Type="Edm.Stream" Nullable="false" /><NavigationProperty
99
+ Name="Person" Relationship="ODataDemo.Person_PersonDetail_PersonDetail_Person"
100
+ ToRole="Person_PersonDetail" FromRole="PersonDetail_Person" /></EntityType><EntityType
101
+ Name="Advertisement" m:HasStream="true"><Key><PropertyRef Name="ID" /></Key><Property
102
+ Name="ID" Type="Edm.Guid" Nullable="false" /><Property Name="Name" Type="Edm.String"
103
+ /><Property Name="AirDate" Type="Edm.DateTime" Nullable="false" /><NavigationProperty
104
+ Name="FeaturedProduct" Relationship="ODataDemo.FeaturedProduct_Advertisement_Advertisement_FeaturedProduct"
105
+ ToRole="FeaturedProduct_Advertisement" FromRole="Advertisement_FeaturedProduct"
106
+ /></EntityType><Association Name="Product_Categories_Category_Products"><End
107
+ Type="ODataDemo.Category" Role="Category_Products" Multiplicity="*" /><End
108
+ Type="ODataDemo.Product" Role="Product_Categories" Multiplicity="*" /></Association><Association
109
+ Name="Product_Supplier_Supplier_Products"><End Type="ODataDemo.Supplier" Role="Supplier_Products"
110
+ Multiplicity="0..1" /><End Type="ODataDemo.Product" Role="Product_Supplier"
111
+ Multiplicity="*" /></Association><Association Name="Product_ProductDetail_ProductDetail_Product"><End
112
+ Type="ODataDemo.ProductDetail" Role="ProductDetail_Product" Multiplicity="0..1"
113
+ /><End Type="ODataDemo.Product" Role="Product_ProductDetail" Multiplicity="0..1"
114
+ /></Association><Association Name="FeaturedProduct_Advertisement_Advertisement_FeaturedProduct"><End
115
+ Type="ODataDemo.Advertisement" Role="Advertisement_FeaturedProduct" Multiplicity="0..1"
116
+ /><End Type="ODataDemo.FeaturedProduct" Role="FeaturedProduct_Advertisement"
117
+ Multiplicity="0..1" /></Association><Association Name="Person_PersonDetail_PersonDetail_Person"><End
118
+ Type="ODataDemo.PersonDetail" Role="PersonDetail_Person" Multiplicity="0..1"
119
+ /><End Type="ODataDemo.Person" Role="Person_PersonDetail" Multiplicity="0..1"
120
+ /></Association><EntityContainer Name="DemoService" m:IsDefaultEntityContainer="true"><EntitySet
121
+ Name="Products" EntityType="ODataDemo.Product" /><EntitySet Name="ProductDetails"
122
+ EntityType="ODataDemo.ProductDetail" /><EntitySet Name="Categories" EntityType="ODataDemo.Category"
123
+ /><EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier" /><EntitySet
124
+ Name="Persons" EntityType="ODataDemo.Person" /><EntitySet Name="PersonDetails"
125
+ EntityType="ODataDemo.PersonDetail" /><EntitySet Name="Advertisements" EntityType="ODataDemo.Advertisement"
126
+ /><FunctionImport Name="GetProductsByRating" ReturnType="Collection(ODataDemo.Product)"
127
+ EntitySet="Products" m:HttpMethod="GET"><Parameter Name="rating" Type="Edm.Int16"
128
+ Nullable="false" /></FunctionImport><AssociationSet Name="Products_Advertisement_Advertisements"
129
+ Association="ODataDemo.FeaturedProduct_Advertisement_Advertisement_FeaturedProduct"><End
130
+ Role="FeaturedProduct_Advertisement" EntitySet="Products" /><End Role="Advertisement_FeaturedProduct"
131
+ EntitySet="Advertisements" /></AssociationSet><AssociationSet Name="Products_Categories_Categories"
132
+ Association="ODataDemo.Product_Categories_Category_Products"><End Role="Product_Categories"
133
+ EntitySet="Products" /><End Role="Category_Products" EntitySet="Categories"
134
+ /></AssociationSet><AssociationSet Name="Products_Supplier_Suppliers" Association="ODataDemo.Product_Supplier_Supplier_Products"><End
135
+ Role="Product_Supplier" EntitySet="Products" /><End Role="Supplier_Products"
136
+ EntitySet="Suppliers" /></AssociationSet><AssociationSet Name="Products_ProductDetail_ProductDetails"
137
+ Association="ODataDemo.Product_ProductDetail_ProductDetail_Product"><End Role="Product_ProductDetail"
138
+ EntitySet="Products" /><End Role="ProductDetail_Product" EntitySet="ProductDetails"
139
+ /></AssociationSet><AssociationSet Name="Persons_PersonDetail_PersonDetails"
140
+ Association="ODataDemo.Person_PersonDetail_PersonDetail_Person"><End Role="Person_PersonDetail"
141
+ EntitySet="Persons" /><End Role="PersonDetail_Person" EntitySet="PersonDetails"
142
+ /></AssociationSet></EntityContainer><Annotations Target="ODataDemo.DemoService"><ValueAnnotation
143
+ Term="Org.OData.Display.V1.Description" String="This is a sample OData service
144
+ with vocabularies" /></Annotations><Annotations Target="ODataDemo.Product"><ValueAnnotation
145
+ Term="Org.OData.Display.V1.Description" String="All Products available in
146
+ the online store" /></Annotations><Annotations Target="ODataDemo.Product/Name"><ValueAnnotation
147
+ Term="Org.OData.Display.V1.DisplayName" String="Product Name" /></Annotations><Annotations
148
+ Target="ODataDemo.DemoService/Suppliers"><ValueAnnotation Term="Org.OData.Publication.V1.PublisherName"
149
+ String="Microsoft Corp." /><ValueAnnotation Term="Org.OData.Publication.V1.PublisherId"
150
+ String="MSFT" /><ValueAnnotation Term="Org.OData.Publication.V1.Keywords"
151
+ String="Inventory, Supplier, Advertisers, Sales, Finance" /><ValueAnnotation
152
+ Term="Org.OData.Publication.V1.AttributionUrl" String="http://www.odata.org/"
153
+ /><ValueAnnotation Term="Org.OData.Publication.V1.AttributionDescription"
154
+ String="All rights reserved" /><ValueAnnotation Term="Org.OData.Publication.V1.DocumentationUrl
155
+ " String="http://www.odata.org/" /><ValueAnnotation Term="Org.OData.Publication.V1.TermsOfUseUrl"
156
+ String="All rights reserved" /><ValueAnnotation Term="Org.OData.Publication.V1.PrivacyPolicyUrl"
157
+ String="http://www.odata.org/" /><ValueAnnotation Term="Org.OData.Publication.V1.LastModified"
158
+ String="4/2/2013" /><ValueAnnotation Term="Org.OData.Publication.V1.ImageUrl
159
+ " String="http://www.odata.org/" /></Annotations></Schema></edmx:DataServices></edmx:Edmx>
160
+ http_version: '1.1'
161
+ adapter_metadata:
162
+ effective_url: http://services.odata.org/OData/OData.svc/$metadata
163
+ recorded_at: Sun, 20 Jul 2014 21:16:26 GMT
164
+ - request:
165
+ method: get
166
+ uri: http://services.odata.org/OData/OData.svc/Products
167
+ body:
168
+ encoding: US-ASCII
169
+ string: ''
170
+ headers:
171
+ User-Agent:
172
+ - Typhoeus - https://github.com/typhoeus/typhoeus
173
+ response:
174
+ status:
175
+ code: 200
176
+ message: OK
177
+ headers:
178
+ Cache-Control:
179
+ - no-cache
180
+ Content-Length:
181
+ - '20955'
182
+ Content-Type:
183
+ - application/atom+xml;type=feed;charset=utf-8
184
+ Server:
185
+ - Microsoft-IIS/8.0
186
+ X-Content-Type-Options:
187
+ - nosniff
188
+ DataServiceVersion:
189
+ - 3.0;
190
+ X-AspNet-Version:
191
+ - 4.0.30319
192
+ X-Powered-By:
193
+ - ASP.NET
194
+ Access-Control-Allow-Origin:
195
+ - "*"
196
+ Access-Control-Allow-Methods:
197
+ - GET
198
+ Access-Control-Allow-Headers:
199
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
200
+ Access-Control-Expose-Headers:
201
+ - DataServiceVersion
202
+ Set-Cookie:
203
+ - ARRAffinity=a9aad020fb0149d28d0efdb1e8bab24ad3481a904c8fb94abced8813c01ee265;Path=/;Domain=services.odata.org
204
+ Date:
205
+ - Sun, 20 Jul 2014 21:16:25 GMT
206
+ body:
207
+ encoding: UTF-8
208
+ string: <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://services.odata.org/OData/OData.svc/"
209
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
210
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
211
+ xmlns:gml="http://www.opengis.net/gml"><id>http://services.odata.org/OData/OData.svc/Products</id><title
212
+ type="text">Products</title><updated>2014-07-20T21:16:26Z</updated><link rel="self"
213
+ title="Products" href="Products" /><entry><id>http://services.odata.org/OData/OData.svc/Products(0)</id><category
214
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
215
+ /><link rel="edit" title="Product" href="Products(0)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
216
+ type="application/atom+xml;type=feed" title="Categories" href="Products(0)/Categories"
217
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
218
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(0)/Supplier"
219
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
220
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(0)/ProductDetail"
221
+ /><title type="text">Bread</title><summary type="text">Whole grain bread</summary><updated>2014-07-20T21:16:26Z</updated><author><name
222
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
223
+ type="application/xml" title="Categories" href="Products(0)/$links/Categories"
224
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
225
+ type="application/xml" title="Supplier" href="Products(0)/$links/Supplier"
226
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
227
+ type="application/xml" title="ProductDetail" href="Products(0)/$links/ProductDetail"
228
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">0</d:ID><d:ReleaseDate
229
+ m:type="Edm.DateTime">1992-01-01T00:00:00</d:ReleaseDate><d:DiscontinuedDate
230
+ m:null="true" /><d:Rating m:type="Edm.Int16">4</d:Rating><d:Price m:type="Edm.Double">2.5</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(1)</id><category
231
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
232
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
233
+ type="application/atom+xml;type=feed" title="Categories" href="Products(1)/Categories"
234
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
235
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(1)/Supplier"
236
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
237
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(1)/ProductDetail"
238
+ /><title type="text">Milk</title><summary type="text">Low fat milk</summary><updated>2014-07-20T21:16:26Z</updated><author><name
239
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
240
+ type="application/xml" title="Categories" href="Products(1)/$links/Categories"
241
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
242
+ type="application/xml" title="Supplier" href="Products(1)/$links/Supplier"
243
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
244
+ type="application/xml" title="ProductDetail" href="Products(1)/$links/ProductDetail"
245
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">1</d:ID><d:ReleaseDate
246
+ m:type="Edm.DateTime">1995-10-01T00:00:00</d:ReleaseDate><d:DiscontinuedDate
247
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">3.5</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(2)</id><category
248
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
249
+ /><link rel="edit" title="Product" href="Products(2)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
250
+ type="application/atom+xml;type=feed" title="Categories" href="Products(2)/Categories"
251
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
252
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(2)/Supplier"
253
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
254
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(2)/ProductDetail"
255
+ /><title type="text">Vint soda</title><summary type="text">Americana Variety
256
+ - Mix of 6 flavors</summary><updated>2014-07-20T21:16:26Z</updated><author><name
257
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
258
+ type="application/xml" title="Categories" href="Products(2)/$links/Categories"
259
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
260
+ type="application/xml" title="Supplier" href="Products(2)/$links/Supplier"
261
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
262
+ type="application/xml" title="ProductDetail" href="Products(2)/$links/ProductDetail"
263
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">2</d:ID><d:ReleaseDate
264
+ m:type="Edm.DateTime">2000-10-01T00:00:00</d:ReleaseDate><d:DiscontinuedDate
265
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">20.9</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(3)</id><category
266
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
267
+ /><link rel="edit" title="Product" href="Products(3)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
268
+ type="application/atom+xml;type=feed" title="Categories" href="Products(3)/Categories"
269
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
270
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(3)/Supplier"
271
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
272
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(3)/ProductDetail"
273
+ /><title type="text">Havina Cola</title><summary type="text">The Original
274
+ Key Lime Cola</summary><updated>2014-07-20T21:16:26Z</updated><author><name
275
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
276
+ type="application/xml" title="Categories" href="Products(3)/$links/Categories"
277
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
278
+ type="application/xml" title="Supplier" href="Products(3)/$links/Supplier"
279
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
280
+ type="application/xml" title="ProductDetail" href="Products(3)/$links/ProductDetail"
281
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">3</d:ID><d:ReleaseDate
282
+ m:type="Edm.DateTime">2005-10-01T00:00:00</d:ReleaseDate><d:DiscontinuedDate
283
+ m:type="Edm.DateTime">2006-10-01T00:00:00</d:DiscontinuedDate><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price
284
+ m:type="Edm.Double">19.9</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(4)</id><category
285
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
286
+ /><link rel="edit" title="Product" href="Products(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
287
+ type="application/atom+xml;type=feed" title="Categories" href="Products(4)/Categories"
288
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
289
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(4)/Supplier"
290
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
291
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(4)/ProductDetail"
292
+ /><title type="text">Fruit Punch</title><summary type="text">Mango flavor,
293
+ 8.3 Ounce Cans (Pack of 24)</summary><updated>2014-07-20T21:16:26Z</updated><author><name
294
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
295
+ type="application/xml" title="Categories" href="Products(4)/$links/Categories"
296
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
297
+ type="application/xml" title="Supplier" href="Products(4)/$links/Supplier"
298
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
299
+ type="application/xml" title="ProductDetail" href="Products(4)/$links/ProductDetail"
300
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">4</d:ID><d:ReleaseDate
301
+ m:type="Edm.DateTime">2003-01-05T00:00:00</d:ReleaseDate><d:DiscontinuedDate
302
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">22.99</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(5)</id><category
303
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
304
+ /><link rel="edit" title="Product" href="Products(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
305
+ type="application/atom+xml;type=feed" title="Categories" href="Products(5)/Categories"
306
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
307
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(5)/Supplier"
308
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
309
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(5)/ProductDetail"
310
+ /><title type="text">Cranberry Juice</title><summary type="text">16-Ounce
311
+ Plastic Bottles (Pack of 12)</summary><updated>2014-07-20T21:16:26Z</updated><author><name
312
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
313
+ type="application/xml" title="Categories" href="Products(5)/$links/Categories"
314
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
315
+ type="application/xml" title="Supplier" href="Products(5)/$links/Supplier"
316
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
317
+ type="application/xml" title="ProductDetail" href="Products(5)/$links/ProductDetail"
318
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">5</d:ID><d:ReleaseDate
319
+ m:type="Edm.DateTime">2006-08-04T00:00:00</d:ReleaseDate><d:DiscontinuedDate
320
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">22.8</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(6)</id><category
321
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
322
+ /><link rel="edit" title="Product" href="Products(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
323
+ type="application/atom+xml;type=feed" title="Categories" href="Products(6)/Categories"
324
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
325
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(6)/Supplier"
326
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
327
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(6)/ProductDetail"
328
+ /><title type="text">Pink Lemonade</title><summary type="text">36 Ounce Cans
329
+ (Pack of 3)</summary><updated>2014-07-20T21:16:26Z</updated><author><name
330
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
331
+ type="application/xml" title="Categories" href="Products(6)/$links/Categories"
332
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
333
+ type="application/xml" title="Supplier" href="Products(6)/$links/Supplier"
334
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
335
+ type="application/xml" title="ProductDetail" href="Products(6)/$links/ProductDetail"
336
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">6</d:ID><d:ReleaseDate
337
+ m:type="Edm.DateTime">2006-11-05T00:00:00</d:ReleaseDate><d:DiscontinuedDate
338
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">18.8</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(7)</id><category
339
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
340
+ /><link rel="edit" title="Product" href="Products(7)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
341
+ type="application/atom+xml;type=feed" title="Categories" href="Products(7)/Categories"
342
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
343
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(7)/Supplier"
344
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
345
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(7)/ProductDetail"
346
+ /><title type="text">DVD Player</title><summary type="text">1080P Upconversion
347
+ DVD Player</summary><updated>2014-07-20T21:16:26Z</updated><author><name /></author><link
348
+ rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
349
+ type="application/xml" title="Categories" href="Products(7)/$links/Categories"
350
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
351
+ type="application/xml" title="Supplier" href="Products(7)/$links/Supplier"
352
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
353
+ type="application/xml" title="ProductDetail" href="Products(7)/$links/ProductDetail"
354
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">7</d:ID><d:ReleaseDate
355
+ m:type="Edm.DateTime">2006-11-15T00:00:00</d:ReleaseDate><d:DiscontinuedDate
356
+ m:null="true" /><d:Rating m:type="Edm.Int16">5</d:Rating><d:Price m:type="Edm.Double">35.88</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(8)</id><category
357
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
358
+ /><link rel="edit" title="Product" href="Products(8)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
359
+ type="application/atom+xml;type=feed" title="Categories" href="Products(8)/Categories"
360
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
361
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(8)/Supplier"
362
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
363
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(8)/ProductDetail"
364
+ /><title type="text">LCD HDTV</title><summary type="text">42 inch 1080p LCD
365
+ with Built-in Blu-ray Disc Player</summary><updated>2014-07-20T21:16:26Z</updated><author><name
366
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
367
+ type="application/xml" title="Categories" href="Products(8)/$links/Categories"
368
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
369
+ type="application/xml" title="Supplier" href="Products(8)/$links/Supplier"
370
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
371
+ type="application/xml" title="ProductDetail" href="Products(8)/$links/ProductDetail"
372
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">8</d:ID><d:ReleaseDate
373
+ m:type="Edm.DateTime">2008-05-08T00:00:00</d:ReleaseDate><d:DiscontinuedDate
374
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">1088.8</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(9)</id><category
375
+ term="ODataDemo.FeaturedProduct" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
376
+ /><link rel="edit" title="Product" href="Products(9)/ODataDemo.FeaturedProduct"
377
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
378
+ type="application/atom+xml;type=feed" title="Categories" href="Products(9)/ODataDemo.FeaturedProduct/Categories"
379
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
380
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(9)/ODataDemo.FeaturedProduct/Supplier"
381
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
382
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(9)/ODataDemo.FeaturedProduct/ProductDetail"
383
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Advertisement"
384
+ type="application/atom+xml;type=entry" title="Advertisement" href="Products(9)/ODataDemo.FeaturedProduct/Advertisement"
385
+ /><title type="text">Lemonade</title><summary type="text">Classic, refreshing
386
+ lemonade (Single bottle)</summary><updated>2014-07-20T21:16:26Z</updated><author><name
387
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
388
+ type="application/xml" title="Categories" href="Products(9)/ODataDemo.FeaturedProduct/$links/Categories"
389
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
390
+ type="application/xml" title="Supplier" href="Products(9)/ODataDemo.FeaturedProduct/$links/Supplier"
391
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
392
+ type="application/xml" title="ProductDetail" href="Products(9)/ODataDemo.FeaturedProduct/$links/ProductDetail"
393
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Advertisement"
394
+ type="application/xml" title="Advertisement" href="Products(9)/ODataDemo.FeaturedProduct/$links/Advertisement"
395
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">9</d:ID><d:ReleaseDate
396
+ m:type="Edm.DateTime">1970-01-01T00:00:00</d:ReleaseDate><d:DiscontinuedDate
397
+ m:null="true" /><d:Rating m:type="Edm.Int16">7</d:Rating><d:Price m:type="Edm.Double">1.01</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(10)</id><category
398
+ term="ODataDemo.FeaturedProduct" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
399
+ /><link rel="edit" title="Product" href="Products(10)/ODataDemo.FeaturedProduct"
400
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
401
+ type="application/atom+xml;type=feed" title="Categories" href="Products(10)/ODataDemo.FeaturedProduct/Categories"
402
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
403
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(10)/ODataDemo.FeaturedProduct/Supplier"
404
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
405
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(10)/ODataDemo.FeaturedProduct/ProductDetail"
406
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Advertisement"
407
+ type="application/atom+xml;type=entry" title="Advertisement" href="Products(10)/ODataDemo.FeaturedProduct/Advertisement"
408
+ /><title type="text">Coffee</title><summary type="text">Bulk size can of instant
409
+ coffee</summary><updated>2014-07-20T21:16:26Z</updated><author><name /></author><link
410
+ rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
411
+ type="application/xml" title="Categories" href="Products(10)/ODataDemo.FeaturedProduct/$links/Categories"
412
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
413
+ type="application/xml" title="Supplier" href="Products(10)/ODataDemo.FeaturedProduct/$links/Supplier"
414
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
415
+ type="application/xml" title="ProductDetail" href="Products(10)/ODataDemo.FeaturedProduct/$links/ProductDetail"
416
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Advertisement"
417
+ type="application/xml" title="Advertisement" href="Products(10)/ODataDemo.FeaturedProduct/$links/Advertisement"
418
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">10</d:ID><d:ReleaseDate
419
+ m:type="Edm.DateTime">1982-12-31T00:00:00</d:ReleaseDate><d:DiscontinuedDate
420
+ m:null="true" /><d:Rating m:type="Edm.Int16">1</d:Rating><d:Price m:type="Edm.Double">6.99</d:Price></m:properties></content></entry></feed>
421
+ http_version: '1.1'
422
+ adapter_metadata:
423
+ effective_url: http://services.odata.org/OData/OData.svc/Products
424
+ recorded_at: Sun, 20 Jul 2014 21:16:26 GMT
425
+ recorded_with: VCR 2.9.2
@@ -161,4 +161,265 @@ http_interactions:
161
161
  adapter_metadata:
162
162
  effective_url: http://services.odata.org/OData/OData.svc/$metadata
163
163
  recorded_at: Sat, 19 Jul 2014 02:59:53 GMT
164
+ - request:
165
+ method: get
166
+ uri: http://services.odata.org/OData/OData.svc/Products
167
+ body:
168
+ encoding: US-ASCII
169
+ string: ''
170
+ headers:
171
+ User-Agent:
172
+ - Typhoeus - https://github.com/typhoeus/typhoeus
173
+ response:
174
+ status:
175
+ code: 200
176
+ message: OK
177
+ headers:
178
+ Cache-Control:
179
+ - no-cache
180
+ Content-Length:
181
+ - '20955'
182
+ Content-Type:
183
+ - application/atom+xml;type=feed;charset=utf-8
184
+ Server:
185
+ - Microsoft-IIS/8.0
186
+ X-Content-Type-Options:
187
+ - nosniff
188
+ DataServiceVersion:
189
+ - 3.0;
190
+ X-AspNet-Version:
191
+ - 4.0.30319
192
+ X-Powered-By:
193
+ - ASP.NET
194
+ Access-Control-Allow-Origin:
195
+ - "*"
196
+ Access-Control-Allow-Methods:
197
+ - GET
198
+ Access-Control-Allow-Headers:
199
+ - Accept, Origin, Content-Type, MaxDataServiceVersion
200
+ Access-Control-Expose-Headers:
201
+ - DataServiceVersion
202
+ Set-Cookie:
203
+ - ARRAffinity=a9aad020fb0149d28d0efdb1e8bab24ad3481a904c8fb94abced8813c01ee265;Path=/;Domain=services.odata.org
204
+ Date:
205
+ - Sun, 20 Jul 2014 21:01:21 GMT
206
+ body:
207
+ encoding: UTF-8
208
+ string: <?xml version="1.0" encoding="utf-8"?><feed xml:base="http://services.odata.org/OData/OData.svc/"
209
+ xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
210
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
211
+ xmlns:gml="http://www.opengis.net/gml"><id>http://services.odata.org/OData/OData.svc/Products</id><title
212
+ type="text">Products</title><updated>2014-07-20T21:01:22Z</updated><link rel="self"
213
+ title="Products" href="Products" /><entry><id>http://services.odata.org/OData/OData.svc/Products(0)</id><category
214
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
215
+ /><link rel="edit" title="Product" href="Products(0)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
216
+ type="application/atom+xml;type=feed" title="Categories" href="Products(0)/Categories"
217
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
218
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(0)/Supplier"
219
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
220
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(0)/ProductDetail"
221
+ /><title type="text">Bread</title><summary type="text">Whole grain bread</summary><updated>2014-07-20T21:01:22Z</updated><author><name
222
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
223
+ type="application/xml" title="Categories" href="Products(0)/$links/Categories"
224
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
225
+ type="application/xml" title="Supplier" href="Products(0)/$links/Supplier"
226
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
227
+ type="application/xml" title="ProductDetail" href="Products(0)/$links/ProductDetail"
228
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">0</d:ID><d:ReleaseDate
229
+ m:type="Edm.DateTime">1992-01-01T00:00:00</d:ReleaseDate><d:DiscontinuedDate
230
+ m:null="true" /><d:Rating m:type="Edm.Int16">4</d:Rating><d:Price m:type="Edm.Double">2.5</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(1)</id><category
231
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
232
+ /><link rel="edit" title="Product" href="Products(1)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
233
+ type="application/atom+xml;type=feed" title="Categories" href="Products(1)/Categories"
234
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
235
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(1)/Supplier"
236
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
237
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(1)/ProductDetail"
238
+ /><title type="text">Milk</title><summary type="text">Low fat milk</summary><updated>2014-07-20T21:01:22Z</updated><author><name
239
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
240
+ type="application/xml" title="Categories" href="Products(1)/$links/Categories"
241
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
242
+ type="application/xml" title="Supplier" href="Products(1)/$links/Supplier"
243
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
244
+ type="application/xml" title="ProductDetail" href="Products(1)/$links/ProductDetail"
245
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">1</d:ID><d:ReleaseDate
246
+ m:type="Edm.DateTime">1995-10-01T00:00:00</d:ReleaseDate><d:DiscontinuedDate
247
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">3.5</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(2)</id><category
248
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
249
+ /><link rel="edit" title="Product" href="Products(2)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
250
+ type="application/atom+xml;type=feed" title="Categories" href="Products(2)/Categories"
251
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
252
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(2)/Supplier"
253
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
254
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(2)/ProductDetail"
255
+ /><title type="text">Vint soda</title><summary type="text">Americana Variety
256
+ - Mix of 6 flavors</summary><updated>2014-07-20T21:01:22Z</updated><author><name
257
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
258
+ type="application/xml" title="Categories" href="Products(2)/$links/Categories"
259
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
260
+ type="application/xml" title="Supplier" href="Products(2)/$links/Supplier"
261
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
262
+ type="application/xml" title="ProductDetail" href="Products(2)/$links/ProductDetail"
263
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">2</d:ID><d:ReleaseDate
264
+ m:type="Edm.DateTime">2000-10-01T00:00:00</d:ReleaseDate><d:DiscontinuedDate
265
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">20.9</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(3)</id><category
266
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
267
+ /><link rel="edit" title="Product" href="Products(3)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
268
+ type="application/atom+xml;type=feed" title="Categories" href="Products(3)/Categories"
269
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
270
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(3)/Supplier"
271
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
272
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(3)/ProductDetail"
273
+ /><title type="text">Havina Cola</title><summary type="text">The Original
274
+ Key Lime Cola</summary><updated>2014-07-20T21:01:22Z</updated><author><name
275
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
276
+ type="application/xml" title="Categories" href="Products(3)/$links/Categories"
277
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
278
+ type="application/xml" title="Supplier" href="Products(3)/$links/Supplier"
279
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
280
+ type="application/xml" title="ProductDetail" href="Products(3)/$links/ProductDetail"
281
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">3</d:ID><d:ReleaseDate
282
+ m:type="Edm.DateTime">2005-10-01T00:00:00</d:ReleaseDate><d:DiscontinuedDate
283
+ m:type="Edm.DateTime">2006-10-01T00:00:00</d:DiscontinuedDate><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price
284
+ m:type="Edm.Double">19.9</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(4)</id><category
285
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
286
+ /><link rel="edit" title="Product" href="Products(4)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
287
+ type="application/atom+xml;type=feed" title="Categories" href="Products(4)/Categories"
288
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
289
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(4)/Supplier"
290
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
291
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(4)/ProductDetail"
292
+ /><title type="text">Fruit Punch</title><summary type="text">Mango flavor,
293
+ 8.3 Ounce Cans (Pack of 24)</summary><updated>2014-07-20T21:01:22Z</updated><author><name
294
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
295
+ type="application/xml" title="Categories" href="Products(4)/$links/Categories"
296
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
297
+ type="application/xml" title="Supplier" href="Products(4)/$links/Supplier"
298
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
299
+ type="application/xml" title="ProductDetail" href="Products(4)/$links/ProductDetail"
300
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">4</d:ID><d:ReleaseDate
301
+ m:type="Edm.DateTime">2003-01-05T00:00:00</d:ReleaseDate><d:DiscontinuedDate
302
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">22.99</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(5)</id><category
303
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
304
+ /><link rel="edit" title="Product" href="Products(5)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
305
+ type="application/atom+xml;type=feed" title="Categories" href="Products(5)/Categories"
306
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
307
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(5)/Supplier"
308
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
309
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(5)/ProductDetail"
310
+ /><title type="text">Cranberry Juice</title><summary type="text">16-Ounce
311
+ Plastic Bottles (Pack of 12)</summary><updated>2014-07-20T21:01:22Z</updated><author><name
312
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
313
+ type="application/xml" title="Categories" href="Products(5)/$links/Categories"
314
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
315
+ type="application/xml" title="Supplier" href="Products(5)/$links/Supplier"
316
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
317
+ type="application/xml" title="ProductDetail" href="Products(5)/$links/ProductDetail"
318
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">5</d:ID><d:ReleaseDate
319
+ m:type="Edm.DateTime">2006-08-04T00:00:00</d:ReleaseDate><d:DiscontinuedDate
320
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">22.8</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(6)</id><category
321
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
322
+ /><link rel="edit" title="Product" href="Products(6)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
323
+ type="application/atom+xml;type=feed" title="Categories" href="Products(6)/Categories"
324
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
325
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(6)/Supplier"
326
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
327
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(6)/ProductDetail"
328
+ /><title type="text">Pink Lemonade</title><summary type="text">36 Ounce Cans
329
+ (Pack of 3)</summary><updated>2014-07-20T21:01:22Z</updated><author><name
330
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
331
+ type="application/xml" title="Categories" href="Products(6)/$links/Categories"
332
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
333
+ type="application/xml" title="Supplier" href="Products(6)/$links/Supplier"
334
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
335
+ type="application/xml" title="ProductDetail" href="Products(6)/$links/ProductDetail"
336
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">6</d:ID><d:ReleaseDate
337
+ m:type="Edm.DateTime">2006-11-05T00:00:00</d:ReleaseDate><d:DiscontinuedDate
338
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">18.8</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(7)</id><category
339
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
340
+ /><link rel="edit" title="Product" href="Products(7)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
341
+ type="application/atom+xml;type=feed" title="Categories" href="Products(7)/Categories"
342
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
343
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(7)/Supplier"
344
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
345
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(7)/ProductDetail"
346
+ /><title type="text">DVD Player</title><summary type="text">1080P Upconversion
347
+ DVD Player</summary><updated>2014-07-20T21:01:22Z</updated><author><name /></author><link
348
+ rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
349
+ type="application/xml" title="Categories" href="Products(7)/$links/Categories"
350
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
351
+ type="application/xml" title="Supplier" href="Products(7)/$links/Supplier"
352
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
353
+ type="application/xml" title="ProductDetail" href="Products(7)/$links/ProductDetail"
354
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">7</d:ID><d:ReleaseDate
355
+ m:type="Edm.DateTime">2006-11-15T00:00:00</d:ReleaseDate><d:DiscontinuedDate
356
+ m:null="true" /><d:Rating m:type="Edm.Int16">5</d:Rating><d:Price m:type="Edm.Double">35.88</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(8)</id><category
357
+ term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
358
+ /><link rel="edit" title="Product" href="Products(8)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
359
+ type="application/atom+xml;type=feed" title="Categories" href="Products(8)/Categories"
360
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
361
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(8)/Supplier"
362
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
363
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(8)/ProductDetail"
364
+ /><title type="text">LCD HDTV</title><summary type="text">42 inch 1080p LCD
365
+ with Built-in Blu-ray Disc Player</summary><updated>2014-07-20T21:01:22Z</updated><author><name
366
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
367
+ type="application/xml" title="Categories" href="Products(8)/$links/Categories"
368
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
369
+ type="application/xml" title="Supplier" href="Products(8)/$links/Supplier"
370
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
371
+ type="application/xml" title="ProductDetail" href="Products(8)/$links/ProductDetail"
372
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">8</d:ID><d:ReleaseDate
373
+ m:type="Edm.DateTime">2008-05-08T00:00:00</d:ReleaseDate><d:DiscontinuedDate
374
+ m:null="true" /><d:Rating m:type="Edm.Int16">3</d:Rating><d:Price m:type="Edm.Double">1088.8</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(9)</id><category
375
+ term="ODataDemo.FeaturedProduct" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
376
+ /><link rel="edit" title="Product" href="Products(9)/ODataDemo.FeaturedProduct"
377
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
378
+ type="application/atom+xml;type=feed" title="Categories" href="Products(9)/ODataDemo.FeaturedProduct/Categories"
379
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
380
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(9)/ODataDemo.FeaturedProduct/Supplier"
381
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
382
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(9)/ODataDemo.FeaturedProduct/ProductDetail"
383
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Advertisement"
384
+ type="application/atom+xml;type=entry" title="Advertisement" href="Products(9)/ODataDemo.FeaturedProduct/Advertisement"
385
+ /><title type="text">Lemonade</title><summary type="text">Classic, refreshing
386
+ lemonade (Single bottle)</summary><updated>2014-07-20T21:01:22Z</updated><author><name
387
+ /></author><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
388
+ type="application/xml" title="Categories" href="Products(9)/ODataDemo.FeaturedProduct/$links/Categories"
389
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
390
+ type="application/xml" title="Supplier" href="Products(9)/ODataDemo.FeaturedProduct/$links/Supplier"
391
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
392
+ type="application/xml" title="ProductDetail" href="Products(9)/ODataDemo.FeaturedProduct/$links/ProductDetail"
393
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Advertisement"
394
+ type="application/xml" title="Advertisement" href="Products(9)/ODataDemo.FeaturedProduct/$links/Advertisement"
395
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">9</d:ID><d:ReleaseDate
396
+ m:type="Edm.DateTime">1970-01-01T00:00:00</d:ReleaseDate><d:DiscontinuedDate
397
+ m:null="true" /><d:Rating m:type="Edm.Int16">7</d:Rating><d:Price m:type="Edm.Double">1.01</d:Price></m:properties></content></entry><entry><id>http://services.odata.org/OData/OData.svc/Products(10)</id><category
398
+ term="ODataDemo.FeaturedProduct" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"
399
+ /><link rel="edit" title="Product" href="Products(10)/ODataDemo.FeaturedProduct"
400
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
401
+ type="application/atom+xml;type=feed" title="Categories" href="Products(10)/ODataDemo.FeaturedProduct/Categories"
402
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
403
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(10)/ODataDemo.FeaturedProduct/Supplier"
404
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
405
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(10)/ODataDemo.FeaturedProduct/ProductDetail"
406
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Advertisement"
407
+ type="application/atom+xml;type=entry" title="Advertisement" href="Products(10)/ODataDemo.FeaturedProduct/Advertisement"
408
+ /><title type="text">Coffee</title><summary type="text">Bulk size can of instant
409
+ coffee</summary><updated>2014-07-20T21:01:22Z</updated><author><name /></author><link
410
+ rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories"
411
+ type="application/xml" title="Categories" href="Products(10)/ODataDemo.FeaturedProduct/$links/Categories"
412
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier"
413
+ type="application/xml" title="Supplier" href="Products(10)/ODataDemo.FeaturedProduct/$links/Supplier"
414
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail"
415
+ type="application/xml" title="ProductDetail" href="Products(10)/ODataDemo.FeaturedProduct/$links/ProductDetail"
416
+ /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Advertisement"
417
+ type="application/xml" title="Advertisement" href="Products(10)/ODataDemo.FeaturedProduct/$links/Advertisement"
418
+ /><content type="application/xml"><m:properties><d:ID m:type="Edm.Int32">10</d:ID><d:ReleaseDate
419
+ m:type="Edm.DateTime">1982-12-31T00:00:00</d:ReleaseDate><d:DiscontinuedDate
420
+ m:null="true" /><d:Rating m:type="Edm.Int16">1</d:Rating><d:Price m:type="Edm.Double">6.99</d:Price></m:properties></content></entry></feed>
421
+ http_version: '1.1'
422
+ adapter_metadata:
423
+ effective_url: http://services.odata.org/OData/OData.svc/Products
424
+ recorded_at: Sun, 20 Jul 2014 21:01:22 GMT
164
425
  recorded_with: VCR 2.9.2
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ describe OData::Query::Result, vcr: {cassette_name: 'query/result_specs'} do
4
+ before(:example) do
5
+ OData::Service.open('http://services.odata.org/OData/OData.svc')
6
+ end
7
+
8
+ let(:subject) { query.execute }
9
+ let(:query) { OData::Query.new(entity_set) }
10
+ let(:entity_set) { OData::ServiceRegistry['ODataDemo']['Products'] }
11
+
12
+ it { expect(subject).to respond_to(:each) }
13
+ describe '#each' do
14
+ it 'returns just OData::Entities of the right type' do
15
+ subject.each do |entity|
16
+ expect(entity).to be_a(OData::Entity)
17
+ expect(entity.type).to eq('Product')
18
+ end
19
+ end
20
+ end
21
+ end
@@ -94,4 +94,9 @@ describe OData::Query, vcr: {cassette_name: 'query_specs'} do
94
94
  expect(subject.to_s).to eq('Products?$orderby=Name,Price')
95
95
  end
96
96
  end
97
+
98
+ it { expect(subject).to respond_to(:execute) }
99
+ describe '#execute' do
100
+ it { expect(subject.execute).to be_a(OData::Query::Result) }
101
+ end
97
102
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Thompson
@@ -170,6 +170,7 @@ files:
170
170
  - lib/odata/property.rb
171
171
  - lib/odata/query.rb
172
172
  - lib/odata/query/criteria.rb
173
+ - lib/odata/query/result.rb
173
174
  - lib/odata/railtie.rb
174
175
  - lib/odata/service.rb
175
176
  - lib/odata/service_registry.rb
@@ -191,6 +192,7 @@ files:
191
192
  - spec/fixtures/vcr_cassettes/entity_set_specs/existing_entry.yml
192
193
  - spec/fixtures/vcr_cassettes/entity_set_specs/new_entry.yml
193
194
  - spec/fixtures/vcr_cassettes/entity_specs.yml
195
+ - spec/fixtures/vcr_cassettes/query/result_specs.yml
194
196
  - spec/fixtures/vcr_cassettes/query_specs.yml
195
197
  - spec/fixtures/vcr_cassettes/service_registry_specs.yml
196
198
  - spec/fixtures/vcr_cassettes/service_specs.yml
@@ -208,6 +210,7 @@ files:
208
210
  - spec/odata/properties/time_spec.rb
209
211
  - spec/odata/property_spec.rb
210
212
  - spec/odata/query/criteria_spec.rb
213
+ - spec/odata/query/result_spec.rb
211
214
  - spec/odata/query_spec.rb
212
215
  - spec/odata/service_registry_spec.rb
213
216
  - spec/odata/service_spec.rb
@@ -253,6 +256,7 @@ test_files:
253
256
  - spec/fixtures/vcr_cassettes/entity_set_specs/existing_entry.yml
254
257
  - spec/fixtures/vcr_cassettes/entity_set_specs/new_entry.yml
255
258
  - spec/fixtures/vcr_cassettes/entity_specs.yml
259
+ - spec/fixtures/vcr_cassettes/query/result_specs.yml
256
260
  - spec/fixtures/vcr_cassettes/query_specs.yml
257
261
  - spec/fixtures/vcr_cassettes/service_registry_specs.yml
258
262
  - spec/fixtures/vcr_cassettes/service_specs.yml
@@ -270,6 +274,7 @@ test_files:
270
274
  - spec/odata/properties/time_spec.rb
271
275
  - spec/odata/property_spec.rb
272
276
  - spec/odata/query/criteria_spec.rb
277
+ - spec/odata/query/result_spec.rb
273
278
  - spec/odata/query_spec.rb
274
279
  - spec/odata/service_registry_spec.rb
275
280
  - spec/odata/service_spec.rb