File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,14 @@ Search-query can be used to automate different steps of the search process, such
88To run API searches, it is often necessary to represent a query in the form of a URL as opposed to a query string.
99Using the Crossref API as an example, the following illustrates how to construct such a URL to retrieve and store records.
1010
11+ .. tip ::
12+
13+ The example below requires the `colrev ` package to be installed. You can install it via pip:
14+
15+ .. code-block :: bash
16+
17+ pip install colrev
18+
1119 .. code-block :: python
1220 :linenos:
1321
@@ -17,7 +25,7 @@ Using the Crossref API as an example, the following illustrates how to construct
1725 from colrev.writer.write_utils import write_file
1826
1927 from search_query.constants import Fields, Operators
20- from search_query.or_query import OrQuery
28+ from search_query.query_or import OrQuery
2129 from search_query.search_file import SearchFile
2230
2331 def to_crossref_url (query ):
@@ -42,7 +50,7 @@ Using the Crossref API as an example, the following illustrates how to construct
4250 query = OrQuery([" microsourcing" , " lululemon" ], field = " title" )
4351
4452 url = to_crossref_url(query)
45- api_crossref = crossref_api.CrossrefAPI(params = { " url" : url} )
53+ api_crossref = crossref_api.CrossrefAPI(url = url)
4654 records = api_crossref.get_records()
4755
4856 sf = SearchFile(
You can’t perform that action at this time.
0 commit comments