2019-06-20 00:20:09 +02:00
|
|
|
import { MetaData } from '../../src' // @oceanprotocol/squid
|
2019-03-15 15:23:28 +01:00
|
|
|
|
|
|
|
const metadata: Partial<MetaData> = {
|
|
|
|
base: {
|
|
|
|
name: undefined,
|
2019-06-20 00:20:09 +02:00
|
|
|
type: 'dataset',
|
|
|
|
description:
|
|
|
|
'Weather information of UK including temperature and humidity',
|
|
|
|
dateCreated: '2012-10-10T17:00:00Z',
|
|
|
|
datePublished: '2012-10-10T17:00:00Z',
|
|
|
|
author: 'Met Office',
|
|
|
|
license: 'CC-BY',
|
|
|
|
copyrightHolder: 'Met Office',
|
|
|
|
workExample:
|
|
|
|
'423432fsd,51.509865,-0.118092,2011-01-01T10:55:11+00:00,7.2,68',
|
2019-04-29 14:35:42 +02:00
|
|
|
links: [
|
2019-03-15 15:23:28 +01:00
|
|
|
{
|
2019-06-20 00:20:09 +02:00
|
|
|
name: 'Sample of Asset Data',
|
|
|
|
type: 'sample',
|
|
|
|
url: 'https://foo.com/sample.csv'
|
2019-03-15 15:23:28 +01:00
|
|
|
},
|
|
|
|
{
|
2019-06-20 00:20:09 +02:00
|
|
|
name: 'Data Format Definition',
|
|
|
|
type: 'format',
|
|
|
|
url: 'https://foo.com/sample.csv'
|
|
|
|
}
|
2019-03-15 15:23:28 +01:00
|
|
|
],
|
2019-06-20 00:20:09 +02:00
|
|
|
inLanguage: 'en',
|
|
|
|
categories: ['Economy', 'Data Science'],
|
|
|
|
tags: ['weather', 'uk', '2011', 'temperature', 'humidity'],
|
|
|
|
price: '21' + '0'.repeat(18),
|
2019-04-29 14:35:42 +02:00
|
|
|
files: [
|
|
|
|
{
|
2019-04-29 15:24:21 +02:00
|
|
|
index: 0,
|
2019-06-20 00:20:09 +02:00
|
|
|
url:
|
|
|
|
'https://raw.githubusercontent.com/oceanprotocol/squid-js/develop/package.json'
|
2019-04-29 14:35:42 +02:00
|
|
|
},
|
|
|
|
{
|
2019-04-29 15:24:21 +02:00
|
|
|
index: 1,
|
2019-06-20 00:20:09 +02:00
|
|
|
url:
|
|
|
|
'https://raw.githubusercontent.com/oceanprotocol/squid-js/develop/README.md'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2019-03-15 15:23:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export const generateMetadata = (name: string): Partial<MetaData> => ({
|
|
|
|
...metadata,
|
|
|
|
base: {
|
|
|
|
...metadata.base,
|
2019-06-20 00:20:09 +02:00
|
|
|
name
|
|
|
|
}
|
2019-03-15 15:23:28 +01:00
|
|
|
})
|
|
|
|
|
2019-06-20 00:20:09 +02:00
|
|
|
export const getMetadata = () => generateMetadata('TestAsset')
|