Skip to content

Commit

Permalink
Minor fixes to pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
beardedfinch committed Nov 3, 2020
1 parent 361dc90 commit 1d630b4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/components/ApiUsage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ const ApiUsage = (props:tPROPS) => {
<tr> <td>Problem Reports</td><td>{this.docCount('tobaccoproblem')}</td> </tr>

<tr className="bg-primary-darkest clr-white" id="dataset-downloads-scroll-anchor"> <td colSpan="2"><strong>Other</strong></td></tr>
<tr> <td>Historical Documents</td><td>{this.docCount('otherhistoricaldocument')}</td> </tr>
<tr> <td>NSDE</td><td>{this.docCount('othernsde')}</td> </tr>
<tr> <td>Substance</td><td>{this.docCount('othersubstance')}</td> </tr>
</tbody>
Expand Down Expand Up @@ -381,6 +382,7 @@ const ApiUsage = (props:tPROPS) => {
<tr><td>Problem Reports</td><td>{this.downloadCount('tobaccoproblem')}</td></tr>

<tr className="bg-primary-darkest clr-white"> <td colSpan="2"><strong>Other</strong></td></tr>
<tr> <td>Historical Documents</td><td>{this.downloadCount('otherhistoricaldocument')}</td> </tr>
<tr> <td>NSDE</td><td>{this.downloadCount('othernsde')}</td> </tr>
<tr> <td>Substance</td><td>{this.downloadCount('othersubstance')}</td> </tr>
</tbody>
Expand Down
5 changes: 3 additions & 2 deletions src/components/RenderContentObject/KeyFacts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ const KeyFacts = (props: tPROPS) => {
'drugsfda': '/data/drugsfda/'
},
'other': {
'nsde': '/apis/other/nsde/',
'nsde': '/data/other/nsde/',
//TODO: Add Substance Data pages.
'substance': '/apis/other/substance/',
'historicaldocument': '/apis/other/historicaldocument/'
'historicaldocument': '/data/other/historicaldocument/'
},
'tobacco': {
'problem': '/data/tobaccoproblem/'
Expand Down
2 changes: 1 addition & 1 deletion src/constants/api.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const API_LINK: string = "https://api.fda.gov"
const API_LINK: string = "https://openfda-api.preprod.fda.gov"
const API_NAME: string = "api.fda.gov"
export default {
API_LINK,
Expand Down
4 changes: 2 additions & 2 deletions src/pages/apis/other/historicaldocument/_explorers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ botulism:
params:
- search for press releases issued in 1919 and 1920 that mention "Botulism" and "Olives"
- limit to 1 record.
query: 'https://api.fda.gov/other/historicaldocument.json?search=doc_type:pr+AND+(year:1919+OR+year:1920)+AND+text:Botulism+AND+text:Olives'
query: 'https://openfda-api.preprod.fda.gov/other/historicaldocument.json?search=doc_type:pr+AND+(year:1919+OR+year:1920)+AND+text:Botulism+AND+text:Olives'
description:
- This query searches for press releases issued in 1919 and 1920 that mention "Botulism" and "Olives" and returns 1 result
title: Press Releases on 1919-1920 Botulism Outbreak
poison:
params:
- search for talk papers on poison prevention packaging
- limit to 5 record.
query: 'https://api.fda.gov/other/historicaldocument.json?search=doc_type:talk+AND+text:"poison prevention packaging"&limit=5'
query: 'https://openfda-api.preprod.fda.gov/other/historicaldocument.json?search=doc_type:talk+AND+text:"poison prevention packaging"&limit=5'
description:
- This query searches for talk papers that discuss poison prevention packaging
title: Talk Papers on Poison Prevention Packaging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class IndexRoute extends React.Component {
<h3>Making a simple API Call</h3>
<p>You can call the API from a web browser. Simply type a valid API query in your browser’s address bar and press the Enter key.</p>
<p>In the example below, we are searching for FDA talk papers on <i>poison prevention packaging</i>. We are requesting to see the first 5 records that match.</p>
<APIQueryBreakdown endpoint_path='/other/historicaldocument.json' query='doc_type:talk+AND+text:"poison prevention packaging"'/>
<APIQueryBreakdown endpoint_path='/other/historicaldocument.json' query='doc_type:talk'/>

This comment has been minimized.

Copy link
@dkrylovsb

dkrylovsb Nov 3, 2020

Collaborator

@beardedfinch Part of query string might have been removed my mistake


<h3>Some key pointers</h3>
<ul>
Expand Down

0 comments on commit 1d630b4

Please sign in to comment.