titlepage 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +340 -0
- data/LICENSE +13 -0
- data/README +17 -0
- data/Rakefile +84 -0
- data/examples/titlepage.rb +15 -0
- data/examples/titlepage_www.rb +11 -0
- data/lib/titlepage/client.rb +88 -0
- data/lib/titlepage/mapping_registry.rb +201 -0
- data/lib/titlepage/titlepage_driver.rb +87 -0
- data/lib/titlepage/titlepage_utils.rb +293 -0
- data/lib/titlepage/wwwclient.rb +102 -0
- data/lib/titlepage.rb +47 -0
- metadata +80 -0
data/lib/titlepage.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
$LOAD_PATH.unshift("/../")
|
2
|
+
|
3
|
+
# the soap4r gem is often a little better than the version that lives in
|
4
|
+
# the ruby standard library, so if the local system has the gem installed
|
5
|
+
# use that
|
6
|
+
begin
|
7
|
+
gem 'soap4r'
|
8
|
+
rescue LoadError => e
|
9
|
+
# do nothing
|
10
|
+
end
|
11
|
+
|
12
|
+
require 'rubygems'
|
13
|
+
require 'rbook/isbn'
|
14
|
+
require File.dirname(__FILE__) + '/titlepage/titlepage_driver'
|
15
|
+
require File.dirname(__FILE__) + '/titlepage/titlepage_utils'
|
16
|
+
require File.dirname(__FILE__) + '/titlepage/mapping_registry'
|
17
|
+
require File.dirname(__FILE__) + '/titlepage/client'
|
18
|
+
require File.dirname(__FILE__) + '/titlepage/wwwclient'
|
19
|
+
|
20
|
+
# a convenience module for accessing the SOAP API for http://www.titlepage.com.
|
21
|
+
# Uses boilerplate code generated by soap4r.
|
22
|
+
#
|
23
|
+
# You should be aware of any limits of query volume imposed by the provider - currently a
|
24
|
+
# maximum of 30 queries per minute is permitted.
|
25
|
+
#
|
26
|
+
# All examples require the following two lines at the top of your file:
|
27
|
+
# require 'rubygems'
|
28
|
+
# require 'titlepage'
|
29
|
+
#
|
30
|
+
# Basic usage:
|
31
|
+
# tp = TitlePage::Client.new
|
32
|
+
# tp.login('someuser','topsecret')
|
33
|
+
# puts tp.find("0091835135").inspect
|
34
|
+
# sleep 3
|
35
|
+
# puts tp.find("9780672327568").inspect
|
36
|
+
# tp.logout
|
37
|
+
#
|
38
|
+
# Alternative Usage:
|
39
|
+
# TitlePage::Client.open("username","password") do |tp|
|
40
|
+
# puts tp.find("0091835135").inspect
|
41
|
+
# sleep 3
|
42
|
+
# puts tp.find("9780672327568").inspect
|
43
|
+
# end
|
44
|
+
module TitlePage
|
45
|
+
class InvalidRubyVersionError < RuntimeError;end;
|
46
|
+
class NotLoggedInError < RuntimeError;end;
|
47
|
+
end
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: titlepage
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- James Healy
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-09-08 00:00:00 +10:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rbook-isbn
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "1.0"
|
24
|
+
version:
|
25
|
+
description: This library is designed to assist with using the titlepage.com SOAP API.
|
26
|
+
email: jimmy@deefa.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- README
|
33
|
+
- COPYING
|
34
|
+
- LICENSE
|
35
|
+
files:
|
36
|
+
- examples/titlepage.rb
|
37
|
+
- examples/titlepage_www.rb
|
38
|
+
- lib/titlepage
|
39
|
+
- lib/titlepage/client.rb
|
40
|
+
- lib/titlepage/titlepage_driver.rb
|
41
|
+
- lib/titlepage/titlepage_utils.rb
|
42
|
+
- lib/titlepage/wwwclient.rb
|
43
|
+
- lib/titlepage/mapping_registry.rb
|
44
|
+
- lib/titlepage.rb
|
45
|
+
- Rakefile
|
46
|
+
- README
|
47
|
+
- COPYING
|
48
|
+
- LICENSE
|
49
|
+
has_rdoc: true
|
50
|
+
homepage: http://rbook.rubyforge.org/
|
51
|
+
post_install_message:
|
52
|
+
rdoc_options:
|
53
|
+
- --title
|
54
|
+
- titlepage Documentation
|
55
|
+
- --main
|
56
|
+
- README
|
57
|
+
- -q
|
58
|
+
require_paths:
|
59
|
+
- lib
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: "0"
|
65
|
+
version:
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: "0"
|
71
|
+
version:
|
72
|
+
requirements: []
|
73
|
+
|
74
|
+
rubyforge_project: rbook
|
75
|
+
rubygems_version: 1.2.0
|
76
|
+
signing_key:
|
77
|
+
specification_version: 2
|
78
|
+
summary: A library for using the titlepage.com API
|
79
|
+
test_files: []
|
80
|
+
|