import {Component, OnInit} from "@angular/core"; import {Meta, Title} from "@angular/platform-browser"; import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; import {properties} from "../../environments/environment"; import {Router} from "@angular/router"; import {AggregatorInfo, PortalAggregators} from "../utils/aggregators"; import {ConnectHelper} from "../openaireLibrary/connect/connectHelper"; import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; import {Subscription} from "rxjs"; @Component({ selector: 'develop', template: `

Develop

Help developers with OpenAIRE APIs

Not sure where to start? Let us give you some guides and request examples.

For research outcomes (publications, datasets, software and other research data) you can use the Selective Access APIs by adding the country parameter.

Request examples:

  • Access “Publications”
    GET https://api.openaire.eu/search/publications?country={{aggregator.valueId}}
  • Access “Open Access Publications”
    GET http://api.openaire.eu/search/publications?country={{aggregator.valueId}}&OA=true
  • Access “Datasets”
    GET https://api.openaire.eu/search/datasets?country={{aggregator.valueId}}
  • Access “Software”
    GET https://api.openaire.eu/search/software?country={{aggregator.valueId}}
  • Access “Other Research”
    GET https://api.openaire.eu/search/other?country={{aggregator.valueId}}
For more information on the full potential of the OpenAIRE APIs please check the OpenAIRE API Documentation.
`, styleUrls: ['develop.component.css'] }) export class DevelopComponent implements OnInit { public aggregator: AggregatorInfo = null; subs: Subscription[] = []; constructor(private seoService: SEOService, private _meta: Meta, private _router: Router, private _title: Title, private _piwikService:PiwikService) { } public ngOnDestroy() { for (let sub of this.subs) { sub.unsubscribe(); } } ngOnInit() { this.aggregator = PortalAggregators.eoscInfo; if (this.aggregator) { /* Metadata */ const url = properties.domain + properties.baseLink + this._router.url; this.seoService.createLinkForCanonicalURL(url, false); this._meta.updateTag({content: url}, "property='og:url'"); const description = "Develop | " + this.aggregator.valueName; const title = "Develop | " + this.aggregator.valueName; this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "property='og:description'"); this._meta.updateTag({content: title}, "property='og:title'"); this._title.setTitle(title); this.subs.push(this._piwikService.trackView(properties, "OpenAIRE").subscribe()); }else { this.navigateToError(); } } private navigateToError() { this._router.navigate([properties.errorLink], {queryParams: {'page': this._router.url}}); } }