No commit activity in last 3 years
No release in over 3 years
Adds support to uri-templates in the dsl restfolia. See http://tools.ietf.org/html/rfc6570
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 1.3.0
>= 0
~> 2.8.0

Runtime

~> 1.0.1
~> 0.3.0
 Project Readme

restfolia-uritemplate Build Status

Adds support to uri-templates in the dsl restfolia with the help of gem uri_template

See more about uri-template in RFC 6570

Example of use

# getting a resource
resource = Restfolia.at('http://local.service.net/id/1').get

# example of hypermedia navigation with uri-template
new_resource_ = resource.link('search').expansion(:term => "dog")
search = new_resource.get  # => GET to url http://local.service.net/d/dog
// GET http://local.service.net/id/1
{
  "value": 10,
  "name": "Test",
  "query": null,
  "tested": false,
  "links": [
    {
      "href": "http://local.service.net/{term:1}/{term}",
      "rel": "search",
      "type": "application/json"
    },
    {
      "href": "http://local.service.net/foo{?query,number}",
      "rel": "another_search",
      "type": "application/json"
    },
    {
      "href": "http://local.service.net/resource/index",
      "rel": "self",
      "type": "application/json"
    }
  ]
}

Copyright

Copyright (c) 2012 Nadilson. See LICENSE.txt for further details.