Skip to content
Auxiliary web services for the Duke Digital Repository
Ruby HTML Other
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
lib
log
public
spec
test/integration/api/v1
vendor/assets
.gitignore
.rspec
.ruby-version
.travis.yml
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
VERSION
config.ru

README.md

ddr-aux

Auxiliary web services for the Duke Digital Repository

Usage

Basic Example

require 'json'
require 'net/http'

uri = URI("<base_url>/api/method")
response = Net::HTTP.get_response(uri)
JSON.load(response.body)

ActiveResource

If you have the activeresource gem installed:

require 'active_resource'

class RightsStatement < ActiveResource::Base
  self.site = "http://localhost:3000/api"
end

Now you can use the usual methods:

RightsStatement.all

RightsStatement.where(url: "http://example.com")

RightsStatement.find(1)
You can’t perform that action at this time.