vericred_client 0.0.6 → 0.0.7

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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -20
  3. data/docs/CarrierSubsidiary.md +1 -0
  4. data/docs/DrugsApi.md +20 -14
  5. data/docs/NetworksApi.md +17 -4
  6. data/docs/Plan.md +3 -0
  7. data/docs/PlanCounty.md +0 -1
  8. data/docs/PlanCountyBulk.md +0 -1
  9. data/docs/PlanSearchResult.md +3 -0
  10. data/docs/PlanZipCounty.md +10 -0
  11. data/docs/PlansApi.md +17 -2
  12. data/docs/ProvidersApi.md +18 -8
  13. data/docs/RequestPlanFind.md +3 -0
  14. data/docs/ZipCountiesApi.md +10 -7
  15. data/lib/vericred_client/api/drugs_api.rb +7 -18
  16. data/lib/vericred_client/api/networks_api.rb +14 -13
  17. data/lib/vericred_client/api/plans_api.rb +24 -13
  18. data/lib/vericred_client/api/providers_api.rb +7 -15
  19. data/lib/vericred_client/api/zip_counties_api.rb +6 -14
  20. data/lib/vericred_client/api_client.rb +6 -10
  21. data/lib/vericred_client/api_error.rb +5 -10
  22. data/lib/vericred_client/configuration.rb +7 -0
  23. data/lib/vericred_client/models/applicant.rb +5 -10
  24. data/lib/vericred_client/models/base.rb +5 -10
  25. data/lib/vericred_client/models/carrier.rb +5 -10
  26. data/lib/vericred_client/models/carrier_subsidiary.rb +19 -14
  27. data/lib/vericred_client/models/county.rb +5 -10
  28. data/lib/vericred_client/models/county_bulk.rb +5 -10
  29. data/lib/vericred_client/models/drug.rb +5 -10
  30. data/lib/vericred_client/models/drug_coverage.rb +5 -10
  31. data/lib/vericred_client/models/drug_coverage_response.rb +5 -10
  32. data/lib/vericred_client/models/drug_package.rb +5 -10
  33. data/lib/vericred_client/models/drug_search_response.rb +5 -10
  34. data/lib/vericred_client/models/meta.rb +5 -10
  35. data/lib/vericred_client/models/network.rb +5 -10
  36. data/lib/vericred_client/models/network_search_response.rb +5 -10
  37. data/lib/vericred_client/models/plan.rb +36 -11
  38. data/lib/vericred_client/models/plan_county.rb +6 -21
  39. data/lib/vericred_client/models/plan_county_bulk.rb +6 -21
  40. data/lib/vericred_client/models/plan_search_response.rb +5 -10
  41. data/lib/vericred_client/models/plan_search_result.rb +36 -11
  42. data/lib/vericred_client/models/plan_zip_county.rb +313 -0
  43. data/lib/vericred_client/models/pricing.rb +5 -10
  44. data/lib/vericred_client/models/provider.rb +5 -10
  45. data/lib/vericred_client/models/provider_show_response.rb +5 -10
  46. data/lib/vericred_client/models/providers_search_response.rb +5 -10
  47. data/lib/vericred_client/models/rating_area.rb +5 -10
  48. data/lib/vericred_client/models/request_plan_find.rb +36 -11
  49. data/lib/vericred_client/models/request_plan_find_applicant.rb +5 -10
  50. data/lib/vericred_client/models/request_plan_find_provider.rb +5 -10
  51. data/lib/vericred_client/models/request_providers_search.rb +5 -10
  52. data/lib/vericred_client/models/state.rb +5 -10
  53. data/lib/vericred_client/models/zip_code.rb +5 -10
  54. data/lib/vericred_client/models/zip_counties_response.rb +5 -10
  55. data/lib/vericred_client/models/zip_county.rb +5 -10
  56. data/lib/vericred_client/models/zip_county_bulk.rb +5 -10
  57. data/lib/vericred_client/models/zip_county_response.rb +5 -10
  58. data/lib/vericred_client/version.rb +6 -11
  59. data/lib/vericred_client.rb +6 -10
  60. data/spec/api/drugs_api_spec.rb +5 -12
  61. data/spec/api/networks_api_spec.rb +8 -11
  62. data/spec/api/plans_api_spec.rb +14 -11
  63. data/spec/api/providers_api_spec.rb +5 -11
  64. data/spec/api/zip_counties_api_spec.rb +5 -11
  65. metadata +4 -2
@@ -0,0 +1,313 @@
1
+ =begin
2
+ Vericred API
3
+
4
+ Vericred's API allows you to search for Health Plans that a specific doctor
5
+ accepts.
6
+
7
+ ## Getting Started
8
+
9
+ Visit our [Developer Portal](https://vericred.3scale.net) to
10
+ create an account.
11
+
12
+ Once you have created an account, you can create one Application for
13
+ Production and another for our Sandbox (select the appropriate Plan when
14
+ you create the Application).
15
+
16
+ ## Authentication
17
+
18
+ To authenticate, pass the API Key you created in the Developer Portal as
19
+ a `Vericred-Api-Key` header.
20
+
21
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
22
+
23
+ ## Versioning
24
+
25
+ Vericred's API default to the latest version. However, if you need a specific
26
+ version, you can request it with an `Accept-Version` header.
27
+
28
+ The current version is `v3`. Previous versions are `v1` and `v2`.
29
+
30
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v2' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
31
+
32
+ ## Pagination
33
+
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
37
+
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
40
+ ```
41
+
42
+ ## Sideloading
43
+
44
+ When we return multiple levels of an object graph (e.g. `Provider`s and their `State`s
45
+ we sideload the associated data. In this example, we would provide an Array of
46
+ `State`s and a `state_id` for each provider. This is done primarily to reduce the
47
+ payload size since many of the `Provider`s will share a `State`
48
+
49
+ ```
50
+ {
51
+ providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }],
52
+ states: [{ id: 1, code: 'NY' }]
53
+ }
54
+ ```
55
+
56
+ If you need the second level of the object graph, you can just match the
57
+ corresponding id.
58
+
59
+ ## Selecting specific data
60
+
61
+ All endpoints allow you to specify which fields you would like to return.
62
+ This allows you to limit the response to contain only the data you need.
63
+
64
+ For example, let's take a request that returns the following JSON by default
65
+
66
+ ```
67
+ {
68
+ provider: {
69
+ id: 1,
70
+ name: 'John',
71
+ phone: '1234567890',
72
+ field_we_dont_care_about: 'value_we_dont_care_about'
73
+ },
74
+ states: [{
75
+ id: 1,
76
+ name: 'New York',
77
+ code: 'NY',
78
+ field_we_dont_care_about: 'value_we_dont_care_about'
79
+ }]
80
+ }
81
+ ```
82
+
83
+ To limit our results to only return the fields we care about, we specify the
84
+ `select` query string parameter for the corresponding fields in the JSON
85
+ document.
86
+
87
+ In this case, we want to select `name` and `phone` from the `provider` key,
88
+ so we would add the parameters `select=provider.name,provider.phone`.
89
+ We also want the `name` and `code` from the `states` key, so we would
90
+ add the parameters `select=states.name,staes.code`. The id field of
91
+ each document is always returned whether or not it is requested.
92
+
93
+ Our final request would be `GET /providers/12345?select=provider.name,provider.phone,states.name,states.code`
94
+
95
+ The response would be
96
+
97
+ ```
98
+ {
99
+ provider: {
100
+ id: 1,
101
+ name: 'John',
102
+ phone: '1234567890'
103
+ },
104
+ states: [{
105
+ id: 1,
106
+ name: 'New York',
107
+ code: 'NY'
108
+ }]
109
+ }
110
+ ```
111
+
112
+
113
+
114
+ OpenAPI spec version: 1.0.0
115
+
116
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
117
+
118
+
119
+ =end
120
+
121
+ require 'date'
122
+
123
+ module VericredClient
124
+ class PlanZipCounty
125
+ # Foreign key to plan
126
+ attr_accessor :plan_id
127
+
128
+ # Foreign key to county
129
+ attr_accessor :county_id
130
+
131
+ # Foreign key to zip code
132
+ attr_accessor :zip_code_id
133
+
134
+ # Attribute mapping from ruby-style variable name to JSON key.
135
+ def self.attribute_map
136
+ {
137
+ :'plan_id' => :'plan_id',
138
+ :'county_id' => :'county_id',
139
+ :'zip_code_id' => :'zip_code_id'
140
+ }
141
+ end
142
+
143
+ # Attribute type mapping.
144
+ def self.swagger_types
145
+ {
146
+ :'plan_id' => :'Integer',
147
+ :'county_id' => :'Integer',
148
+ :'zip_code_id' => :'Integer'
149
+ }
150
+ end
151
+
152
+ # Initializes the object
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ def initialize(attributes = {})
155
+ return unless attributes.is_a?(Hash)
156
+
157
+ # convert string to symbol for hash key
158
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
159
+
160
+ if attributes.has_key?(:'plan_id')
161
+ self.plan_id = attributes[:'plan_id']
162
+ end
163
+
164
+ if attributes.has_key?(:'county_id')
165
+ self.county_id = attributes[:'county_id']
166
+ end
167
+
168
+ if attributes.has_key?(:'zip_code_id')
169
+ self.zip_code_id = attributes[:'zip_code_id']
170
+ end
171
+
172
+ end
173
+
174
+ # Show invalid properties with the reasons. Usually used together with valid?
175
+ # @return Array for valid properies with the reasons
176
+ def list_invalid_properties
177
+ invalid_properties = Array.new
178
+ return invalid_properties
179
+ end
180
+
181
+ # Check to see if the all the properties in the model are valid
182
+ # @return true if the model is valid
183
+ def valid?
184
+ end
185
+
186
+ # Checks equality by comparing each attribute.
187
+ # @param [Object] Object to be compared
188
+ def ==(o)
189
+ return true if self.equal?(o)
190
+ self.class == o.class &&
191
+ plan_id == o.plan_id &&
192
+ county_id == o.county_id &&
193
+ zip_code_id == o.zip_code_id
194
+ end
195
+
196
+ # @see the `==` method
197
+ # @param [Object] Object to be compared
198
+ def eql?(o)
199
+ self == o
200
+ end
201
+
202
+ # Calculates hash code according to all attributes.
203
+ # @return [Fixnum] Hash code
204
+ def hash
205
+ [plan_id, county_id, zip_code_id].hash
206
+ end
207
+
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def build_from_hash(attributes)
212
+ return nil unless attributes.is_a?(Hash)
213
+ self.class.swagger_types.each_pair do |key, type|
214
+ if type =~ /^Array<(.*)>/i
215
+ # check to ensure the input is an array given that the the attribute
216
+ # is documented as an array but the input is not
217
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
218
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
219
+ end
220
+ elsif !attributes[self.class.attribute_map[key]].nil?
221
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
222
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
223
+ end
224
+
225
+ self
226
+ end
227
+
228
+ # Deserializes the data based on type
229
+ # @param string type Data type
230
+ # @param string value Value to be deserialized
231
+ # @return [Object] Deserialized data
232
+ def _deserialize(type, value)
233
+ case type.to_sym
234
+ when :DateTime
235
+ DateTime.parse(value)
236
+ when :Date
237
+ Date.parse(value)
238
+ when :String
239
+ value.to_s
240
+ when :Integer
241
+ value.to_i
242
+ when :Float
243
+ value.to_f
244
+ when :BOOLEAN
245
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
246
+ true
247
+ else
248
+ false
249
+ end
250
+ when :Object
251
+ # generic object (usually a Hash), return directly
252
+ value
253
+ when /\AArray<(?<inner_type>.+)>\z/
254
+ inner_type = Regexp.last_match[:inner_type]
255
+ value.map { |v| _deserialize(inner_type, v) }
256
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
257
+ k_type = Regexp.last_match[:k_type]
258
+ v_type = Regexp.last_match[:v_type]
259
+ {}.tap do |hash|
260
+ value.each do |k, v|
261
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
262
+ end
263
+ end
264
+ else # model
265
+ temp_model = VericredClient.const_get(type).new
266
+ temp_model.build_from_hash(value)
267
+ end
268
+ end
269
+
270
+ # Returns the string representation of the object
271
+ # @return [String] String presentation of the object
272
+ def to_s
273
+ to_hash.to_s
274
+ end
275
+
276
+ # to_body is an alias to to_hash (backward compatibility)
277
+ # @return [Hash] Returns the object in the form of hash
278
+ def to_body
279
+ to_hash
280
+ end
281
+
282
+ # Returns the object in the form of hash
283
+ # @return [Hash] Returns the object in the form of hash
284
+ def to_hash
285
+ hash = {}
286
+ self.class.attribute_map.each_pair do |attr, param|
287
+ value = self.send(attr)
288
+ next if value.nil?
289
+ hash[param] = _to_hash(value)
290
+ end
291
+ hash
292
+ end
293
+
294
+ # Outputs non-array value in the form of hash
295
+ # For object, use to_hash. Otherwise, just return the value
296
+ # @param [Object] value Any valid value
297
+ # @return [Hash] Returns the value in the form of hash
298
+ def _to_hash(value)
299
+ if value.is_a?(Array)
300
+ value.compact.map{ |v| _to_hash(v) }
301
+ elsif value.is_a?(Hash)
302
+ {}.tap do |hash|
303
+ value.each { |k, v| hash[k] = _to_hash(v) }
304
+ end
305
+ elsif value.respond_to? :to_hash
306
+ value.to_hash
307
+ else
308
+ value
309
+ end
310
+ end
311
+
312
+ end
313
+ end
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -151,6 +146,15 @@ module VericredClient
151
146
  # List of providers to search for.
152
147
  attr_accessor :providers
153
148
 
149
+ # Selected page of paginated response.
150
+ attr_accessor :page
151
+
152
+ # Results per page of response.
153
+ attr_accessor :per_page
154
+
155
+ # Sort responses by plan field.
156
+ attr_accessor :sort
157
+
154
158
  # 5-digit zip code - this helps determine pricing.
155
159
  attr_accessor :zip_code
156
160
 
@@ -165,6 +169,9 @@ module VericredClient
165
169
  :'household_size' => :'household_size',
166
170
  :'market' => :'market',
167
171
  :'providers' => :'providers',
172
+ :'page' => :'page',
173
+ :'per_page' => :'per_page',
174
+ :'sort' => :'sort',
168
175
  :'zip_code' => :'zip_code'
169
176
  }
170
177
  end
@@ -180,6 +187,9 @@ module VericredClient
180
187
  :'household_size' => :'Integer',
181
188
  :'market' => :'String',
182
189
  :'providers' => :'Array<RequestPlanFindProvider>',
190
+ :'page' => :'Integer',
191
+ :'per_page' => :'Integer',
192
+ :'sort' => :'String',
183
193
  :'zip_code' => :'String'
184
194
  }
185
195
  end
@@ -230,6 +240,18 @@ module VericredClient
230
240
  end
231
241
  end
232
242
 
243
+ if attributes.has_key?(:'page')
244
+ self.page = attributes[:'page']
245
+ end
246
+
247
+ if attributes.has_key?(:'per_page')
248
+ self.per_page = attributes[:'per_page']
249
+ end
250
+
251
+ if attributes.has_key?(:'sort')
252
+ self.sort = attributes[:'sort']
253
+ end
254
+
233
255
  if attributes.has_key?(:'zip_code')
234
256
  self.zip_code = attributes[:'zip_code']
235
257
  end
@@ -261,6 +283,9 @@ module VericredClient
261
283
  household_size == o.household_size &&
262
284
  market == o.market &&
263
285
  providers == o.providers &&
286
+ page == o.page &&
287
+ per_page == o.per_page &&
288
+ sort == o.sort &&
264
289
  zip_code == o.zip_code
265
290
  end
266
291
 
@@ -273,7 +298,7 @@ module VericredClient
273
298
  # Calculates hash code according to all attributes.
274
299
  # @return [Fixnum] Hash code
275
300
  def hash
276
- [applicants, enrollment_date, drug_packages, fips_code, household_income, household_size, market, providers, zip_code].hash
301
+ [applicants, enrollment_date, drug_packages, fips_code, household_income, household_size, market, providers, page, per_page, sort, zip_code].hash
277
302
  end
278
303
 
279
304
  # Builds the object from hash
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading
@@ -31,17 +31,12 @@ The current version is `v3`. Previous versions are `v1` and `v2`.
31
31
 
32
32
  ## Pagination
33
33
 
34
- Most endpoints are not paginated. It will be noted in the documentation if/when
35
- an endpoint is paginated.
34
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
35
+ four additional fields that contain data about your position in the response,
36
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
36
37
 
37
- When pagination is present, a `meta` stanza will be present in the response
38
- with the total number of records
39
-
40
- ```
41
- {
42
- things: [{ id: 1 }, { id: 2 }],
43
- meta: { total: 500 }
44
- }
38
+ For example, to display 5 results per page and view the second page of a
39
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
45
40
  ```
46
41
 
47
42
  ## Sideloading