blacklight_unapi 0.0.1rc1 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.rdoc +56 -4
  2. data/VERSION +1 -1
  3. metadata +35 -65
data/README.rdoc CHANGED
@@ -4,6 +4,8 @@ BlacklightUnapi: unAPI provider plugin for Blacklight
4
4
 
5
5
  The BlacklightUnapi plugin provides an unapi endpoint for Blacklight records. unAPI is a tiny HTTP API for the few basic operations necessary to copy discrete, identified content from any kind of web application.
6
6
 
7
+ unAPI is a tiny HTTP API any web application may use to co-publish discretely identified objects in both HTML pages and disparate bare object formats. It consists of three parts: an identifier microformat, an HTML autodiscovery link, and three HTTP interface functions, two of which have a standardized response format. [http://unapi.info/](http://unapi.info/).
8
+
7
9
  = Requirements
8
10
 
9
11
  A Rails app using Blacklight >3.x.
@@ -12,7 +14,7 @@ A Rails app using Blacklight >3.x.
12
14
 
13
15
  Add
14
16
 
15
- gem "blacklight_highlight"
17
+ gem "blacklight_unapi"
16
18
 
17
19
  to your Gemfile and run "bundle install".
18
20
 
@@ -20,8 +22,15 @@ Then, run "rails generate blacklight_unapi" to install the unAPI configuration a
20
22
 
21
23
  = Configuration
22
24
 
23
- See ./config/initializers/blacklight_config for unAPI configuration options, where you can list the default set of document formats (which must be available for every document served). By default, this is only OAI Dublin Core.
25
+ See ./config/initializers/blacklight_config for unAPI configuration options, where you can list the default set of document formats (which must be available for every document served).
26
+
27
+ Out of the box, only the OAI Dublin Core XML format is advertised as it can be be automatically generated from the Blacklight "semantic fields" configuration. Other common export formats must be defined within the Blacklight configuration. Implementors SHOULD customize this list using the [[Blacklight.config[:unapi]|https://github.com/projectblacklight/blacklight/blob/master/config/initializers/blacklight_config.rb#L263]] hash, which is formatted as the [Blacklight::Solr::Document#export_formats](https://github.com/projectblacklight/blacklight/blob/master/lib/blacklight/solr/document.rb#L155) output, e.g.:
24
28
 
29
+ config[:unapi] = {
30
+ 'oai_dc_xml' => { :content_type => 'text/xml' },
31
+ 'marc' => { :content_type => 'application/marc' },
32
+ 'jpg' => { :content_type => 'image/jpg' }
33
+ }
25
34
 
26
35
  == Injection
27
36
 
@@ -41,8 +50,51 @@ You can also turn off injection of individual components, which could be more us
41
50
  :routes => false,
42
51
  }
43
52
 
44
- = Tests
53
+ == API Requests
54
+
55
+ === /catalog/unapi
56
+
57
+ Provides a list of object formats available for all objects.
58
+
59
+
60
+ <?xml version="1.0" encoding="UTF-8"?>
61
+ <formats>
62
+ <format type="text/xml" name="oai_dc_xml"/>
63
+ </formats>
64
+
65
+
66
+ Source: [[http://demo.projectblacklight.org/catalog/unapi]]
67
+
68
+ === /catalog/unapi?id=IDENTIFIER
69
+
70
+ Provides a list of object formats available for the object identified by "IDENTIFIER". The object formats are generated from the Document Extension Framework [Blacklight::Solr::Document#export_formats](https://github.com/projectblacklight/blacklight/blob/master/lib/blacklight/solr/document.rb#L155).
71
+
72
+ In the future, Blacklight may provide mechanisms within the Document Extension Framework for filtering the list of object formats (see [CODEBASE-301](http://jira.projectblacklight.org/jira/browse/CODEBASE-301)). In the meantime, to filter this list of object formats, implementors are encouraged to override [./app/views/catalog/unapi.xml.builder](https://github.com/projectblacklight/blacklight/blob/master/app/views/catalog/unapi.xml.builder) (or CatalogController#unapi) locally.
73
+
74
+
75
+ <?xml version="1.0" encoding="UTF-8"?>
76
+ <formats id="u1">
77
+ <format type="text/plain" name="refworks_marc_txt"/>
78
+ <format type="text/xml" name="dc_xml"/>
79
+ <format type="application/x-endnote-refer" name="endnote"/>
80
+ <format type="application/xml" name="xml"/>
81
+ <format type="text/xml" name="oai_dc_xml"/>
82
+ <format type="application/marc" name="marc"/>
83
+ <format type="application/x-openurl-ctx-kev" name="openurl_ctx_kev"/>
84
+ <format type="application/marcxml+xml" name="marcxml"/>
85
+ </formats>
86
+
87
+
88
+ Source: [[http://demo.projectblacklight.org/catalog/unapi?id=u1]]
89
+
90
+ === /catalog/unapi?id=IDENTIFIER&format=FORMAT
91
+
92
+ Provides the raw "FORMAT" representation for the object identified by "IDENTIFIER"
93
+
94
+
95
+ <oai_dc:dc xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:language>English</dc:language><dc:title>The book of the dance in the 20th century selections from the Jane Bourne Parton collection of books on the dance</dc:title><dc:format>Book</dc:format> </oai_dc:dc>
96
+
45
97
 
46
- There are none. This is bad I know, sorry.
98
+ Source: [[http://demo.projectblacklight.org/catalog/unapi?id=u1&format=oai_dc_xml]]
47
99
 
48
100
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1rc1
1
+ 0.0.1
metadata CHANGED
@@ -1,64 +1,46 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: blacklight_unapi
3
- version: !ruby/object:Gem::Version
4
- hash: 15424031
5
- prerelease: 5
6
- segments:
7
- - 0
8
- - 0
9
- - 1
10
- - rc
11
- - 1
12
- version: 0.0.1rc1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
13
6
  platform: ruby
14
- authors:
7
+ authors:
15
8
  - Chris Beer
16
9
  autorequire:
17
10
  bindir: bin
18
11
  cert_chain: []
19
-
20
- date: 2011-08-08 00:00:00 -04:00
12
+ date: 2011-09-28 00:00:00.000000000 -04:00
21
13
  default_executable:
22
- dependencies:
23
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
24
16
  name: rails
25
- prerelease: false
26
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &2156358920 !ruby/object:Gem::Requirement
27
18
  none: false
28
- requirements:
19
+ requirements:
29
20
  - - ~>
30
- - !ruby/object:Gem::Version
31
- hash: 7
32
- segments:
33
- - 3
34
- - 0
35
- version: "3.0"
21
+ - !ruby/object:Gem::Version
22
+ version: '3.0'
36
23
  type: :runtime
37
- version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: blacklight
40
24
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *2156358920
26
+ - !ruby/object:Gem::Dependency
27
+ name: blacklight
28
+ requirement: &2156358460 !ruby/object:Gem::Requirement
42
29
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- hash: 3
47
- segments:
48
- - 0
49
- version: "0"
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
50
34
  type: :runtime
51
- version_requirements: *id002
35
+ prerelease: false
36
+ version_requirements: *2156358460
52
37
  description:
53
- email:
38
+ email:
54
39
  - chris_beer@wgbh.org
55
40
  executables: []
56
-
57
41
  extensions: []
58
-
59
42
  extra_rdoc_files: []
60
-
61
- files:
43
+ files:
62
44
  - MIT-LICENSE
63
45
  - README.rdoc
64
46
  - Rakefile
@@ -78,38 +60,26 @@ files:
78
60
  has_rdoc: true
79
61
  homepage: http://projectblacklight.org/
80
62
  licenses: []
81
-
82
63
  post_install_message:
83
64
  rdoc_options: []
84
-
85
- require_paths:
65
+ require_paths:
86
66
  - lib
87
- required_ruby_version: !ruby/object:Gem::Requirement
67
+ required_ruby_version: !ruby/object:Gem::Requirement
88
68
  none: false
89
- requirements:
90
- - - ">="
91
- - !ruby/object:Gem::Version
92
- hash: 3
93
- segments:
94
- - 0
95
- version: "0"
96
- required_rubygems_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ! '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
74
  none: false
98
- requirements:
99
- - - ">"
100
- - !ruby/object:Gem::Version
101
- hash: 25
102
- segments:
103
- - 1
104
- - 3
105
- - 1
106
- version: 1.3.1
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
107
79
  requirements: []
108
-
109
80
  rubyforge_project: blacklight
110
81
  rubygems_version: 1.6.2
111
82
  signing_key:
112
83
  specification_version: 3
113
84
  summary: Blacklight unapi plugin
114
85
  test_files: []
115
-