mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Issue-#850: Rest api
This commit is contained in:
parent
220ea7df29
commit
9b4de97167
@ -11,12 +11,12 @@
|
||||
- group: Aquarius REST API
|
||||
items:
|
||||
- title: API Reference
|
||||
link: /references/aquarius-rest-api/
|
||||
link: /references/aquarius/
|
||||
|
||||
- group: provider REST API
|
||||
items:
|
||||
- title: API Reference
|
||||
link: /references/provider-rest-api/
|
||||
link: /references/provider/
|
||||
|
||||
- group: Provider Py Module
|
||||
items:
|
||||
|
@ -133,6 +133,34 @@ exports.createPages = ({ graphql, actions }) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
providerRestApi: allMarkdownRemark(
|
||||
filter: {
|
||||
frontmatter: {
|
||||
title: { eq: "API.md" }
|
||||
app: { eq: "aquarius" }
|
||||
}
|
||||
}
|
||||
) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
html
|
||||
htmlAst
|
||||
tableOfContents
|
||||
frontmatter {
|
||||
title
|
||||
description
|
||||
slug
|
||||
section
|
||||
app
|
||||
module
|
||||
source
|
||||
version
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
).then(async (result) => {
|
||||
@ -194,31 +222,21 @@ exports.createPages = ({ graphql, actions }) => {
|
||||
const oceanPyList = filterMarkdownList(markdowns, 'ocean.py')
|
||||
const providerList = filterMarkdownList(markdowns, 'provider')
|
||||
const subgraphList = filterMarkdownList(markdowns, 'ocean-subgraph')
|
||||
// const aquariusList = filterMarkdownList(markdowns, 'aquarius')
|
||||
const r = markdowns.map(({ node }) => [
|
||||
node.frontmatter.title,
|
||||
node.frontmatter.app,
|
||||
node.frontmatter.source,
|
||||
node.frontmatter.version
|
||||
])
|
||||
console.log('Aquarius rest api', r)
|
||||
|
||||
const aquariusRestApi = result.data.aquariusRestApi.edges[0].node
|
||||
await createRestApiPage(
|
||||
createPage,
|
||||
aquariusRestApi,
|
||||
`/references/aquarius-rest-api`
|
||||
`/references/aquarius`
|
||||
)
|
||||
|
||||
// const providerRestApi = getRestApiPageFromMarkdownList(
|
||||
// markdowns,
|
||||
// 'provider'
|
||||
// )[0].node
|
||||
const providerRestApi = result.data.providerRestApi.edges[0].node
|
||||
|
||||
// await createRestApiPage(
|
||||
// createPage,
|
||||
// providerRestApi,
|
||||
// `/references/provider-rest-api`
|
||||
// )
|
||||
await createRestApiPage(
|
||||
createPage,
|
||||
providerRestApi,
|
||||
`/references/provider`
|
||||
)
|
||||
|
||||
await createReadTheDocsPage(createPage, 'ocean-py', oceanPyList)
|
||||
await createReadTheDocsPage(createPage, 'provider', providerList)
|
||||
|
Loading…
Reference in New Issue
Block a user