Skip to content

Commit 15603bd

Browse files
committed
Update README
1 parent b15ccfd commit 15603bd

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

README.md

+25-15
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,32 @@ hathitrust-api
33

44
A simple interface for the HathiTrust APIs. The package contains basic classes and associated methods for querying the [Bibliographic API][bib api], [Data API][data api], and the [HTRC Solr Proxy][solr api].
55

6+
The package is compatible with Python 2 and Python 3.
7+
68
[bib api]: http://www.hathitrust.org/bib_api
79
[data api]: http://www.hathitrust.org/data_api
810
[solr api]: http://wiki.htrc.illinois.edu/display/COM/Solr+Proxy+API+User+Guide
911

10-
#### DataAPI
12+
Installation
13+
------------
14+
15+
Clone and install from this repository:
16+
```
17+
git clone https://github.com/rlmv/hathitrust-api.git
18+
cd hathitrust-api
19+
python setup.py install
20+
```
21+
22+
Or install directly using `pip`:
23+
```
24+
pip install hathitrust-api
25+
```
26+
27+
DataAPI
28+
-------
1129
The Data API retrieves non-google public domain works from the HathiTrust.
1230

13-
An OAuth [keyset][kgs] from HathiTrust is required to use the Data API.
31+
An OAuth [keyset][kgs] from HathiTrust is required to use the Data API.
1432

1533
Example usage:
1634
```
@@ -21,7 +39,8 @@ Example usage:
2139

2240
[kgs]: http://babel.hathitrust.org/cgi/kgs/request
2341

24-
#### BibAPI
42+
BibAPI
43+
------
2544
The bibliographic API delivers HathiTrust bibliographic data and MARC records in JSON format.
2645

2746
Example:
@@ -35,27 +54,18 @@ Example:
3554
[u'1670']
3655
```
3756

38-
#### SolrAPI
57+
SolrAPI
58+
-------
3959
The HTRC Solr Proxy is a search index over the public domain collection.
4060

41-
```
61+
```
4262
>>> from hathitrust_api import SolrAPI
4363
>>> solr = SolrAPI()
4464
>>> results = solr.query("new zealand", fields=['title'])
4565
>>> results
4666
{u'responseHeader': {u'status': 0, u'QTime': 19}, u'response': {u'start': 0, u'numFound': 366613, u'docs': [{u'title': [u'The statues of New Zealand ...']}, {u'title': [u'New Zealand.']}, {u'title': [u"Wise's New Zealand index"]}, {u'title': [u'Palaeontological bulletin.']}, {u'title': [u'New Zealand,']}, {u'title': [u'The New Zealand official year-book.']}, {u'title': [u'The New Zealand official year-book.']}, {u'title': [u'The New Zealand official year-book.']}, {u'title': [u'The New Zealand official year-book.']}, {u'title': [u'The New Zealand official year-book.']}]}}
4767
```
4868

49-
50-
51-
Packages:
52-
---------
53-
* [requests][requests] (available in PyPI)
54-
* [requests-oauthlib][req oauth] (a Requests plugin; the version in PyPI had some errors, so you may need to get it straight from the source.)
55-
56-
[req oauth]: https://github.com/requests/requests-oauthlib
57-
[requests]: http://docs.python-requests.org/en/latest/
58-
5969
Needed:
6070
------
6171
* Write test cases.

0 commit comments

Comments
 (0)