v1.2.0
Major changes
- Adds serialization support through the following methods (#63):
to_h
: Serialize into a Ruby hash (with symbol keys). Accepts a boolean argument, representing whether or not to deep-serialize nestedAuthor
andCategory
objects (defaults tofalse
).as_json
: Serialize into a Ruby hash which is also a valid JSON hash.to_json
: Serialize into a valid JSON string.
- Remove version filter from query ID list. (#69)
Previously, all of the following would return the latest paper,
1807.06918v2
:Arx.get('1807.06918').version #=> 2 Arx.get('1807.06918v1').version #=> 2 Arx.get('1807.06918v2').version #=> 2
- Adds
ATTRIBUTES
constant forPaper
,Author
andCategory
entities, as a list of which attributes are available for the entity. (#63) - Remove key-word arguments from
Paper#id
andPaper#url
. (#70)Previously,
Paper#id
andPaper#url
accepted aversion
key-word argument, which was a boolean variable indicating whether or not to include the version number in the ID or URL.This has now been changed to a regular argument, which still defaults to
false
.paper = Arx.get('cond-mat/9609089') # Old (no longer works) paper.id(version: true) paper.url(version: true) # New paper.id(true) #=> "cond-mat/9609089v1" paper.url(true) #=> "http://arxiv.org/abs/cond-mat/9609089v1"
- Add equality operator (
==
) to entities. (#68)