v5.2.0
Actions Required to Upgrade
No actions are required for this upgrade other than adjusting your gem file to allow for version 5.2.0 to be included by bundler.
Support for Rails 6.0
This release adds support for Rails 6.0.
New Feature - Response Header for DISCOG authority
When requesting a search from DISCOG authority, you can request a response header be included in the results. For search, the response header has basic information to facilitate pagination.
Usage
Parameters
parameter | values | example | purpose |
---|---|---|---|
response_header | true, false | response_header=true | Include the pagination information in a response_header of the results. (default=false |
page_num | integer | page_num=2 | The number of the page to return. Works in conjunction with page_size. |
page_size | integer | page_size=5 | The number of results to return. Works in conjunction with page_num. |
startRecord | integer | startRecord=6 | The offset into the full set of results with the first record as 1. Works in conjunction with maxRecords. |
maxRecords | integer | maxRecords=5 | The number of results to return. Works in conjunction with startRecord. |
Note on page/offset requests...
You can either specify page_num and page_size or specify startRecord and maxRecords. They cannot be mixed.
- page_num and page_size - These are supported directly by discogs.
- startRecord (i.e., offset) and maxRecords - These are provided to match the most common approach used in the linked data module.
Example URLs:
Both of these will return results 6-10.
response_header
The structure of the response header is...
response_header = {
start_record: 6 # the number of the first record returned
requested_records: 5 # the number of records requested (aka page size)
retrieved_records: 5 # the actual number of records returned in this request
total_records: 85 # the total number of matches for this search request
}
Change Log
- add optional response header which has pagination information for DISCOGs search
- add support for Rails 6