Permalink
Browse files

add Singapore Libraries example

  • Loading branch information...
1 parent f46ee45 commit 5d234788f36d0b90503f2896203fbeb77c176f1c @tardate committed Nov 5, 2011
Showing with 11 additions and 2 deletions.
  1. +1 −1 LICENSE
  2. +1 −1 README.rdoc
  3. +2 −0 examples/catalog_traversal.rb
  4. +7 −0 examples/singapore_libraries.rb
View
@@ -1,4 +1,4 @@
-Copyright (c) 2011 Paul Gallagher
+Copyright (c) 2011 Paul Gallagher, Evendis Pte Ltd http://evendis.com
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
@@ -95,7 +95,7 @@ enforcement or protection.
== Contributing to RGovData
-
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
* Fork the project
@@ -2,6 +2,8 @@
require 'rgovdata'
# This demonstrates the essential process of traversing the RGovData catalog
+# Note: this example probably requires valid projectnimbus credentials in your rgovdata.conf file
+# since it will blindly traverse the tree and may hit a projectnimbus service
# This gets the root catalog
root_catalog = RGovData::Catalog.new(nil)
@@ -0,0 +1,7 @@
+#!/usr/bin/env ruby
+require 'rgovdata'
+
+# This demonstrates how to use RGovData with OData web services
+# Note: this example requires valid projectnimbus credentials in your rgovdata.conf file
+
+RGovData::Catalog.get('//sg/nlb/LibrarySet').records.each { |library| puts library.Name }

0 comments on commit 5d23478

Please sign in to comment.