12345678910111213141516171819 |
- const axios = require('axios')
- module.exports = function (api) {
- api.loadSource(async store => {
- const { data } = await axios.get('http://api.archives-ouvertes.fr/search/?q=docid:2172000&fl=*')
- const contentType = store.addContentType({
- typeName: 'article',
- })
- let item = data.response.docs[0];
- contentType.addNode({
- id: item.docid,
- title: item.title_s[0],
- path:"article",
- })
- })
- }
|