ebinocle-ng-rsclient
EBI Search Angular REST client
Install
npm i @ebi-wp/ebinocle-ng-rsclient
Usage example
The following example, creates a SearchRequest
object, sets the domain and query.
Then it gets the search results using that object.
import { Component } from '@angular/core';
import { Configuration, SearchRequest, SearchService } from '@ebi-wp/ebinocle-ng-rsclient';
@Component({
selector: 'app-search',
templateUrl: './search.component.html'
})
export class SearchComponent {
constructor(private readonly searchService: SearchService) {}
public search() {
const searchRequest = new SearchRequest(new Configuration());
searchRequest.setDB('embl');
searchRequest.query = 'mouse';
return this.searchService.getSearchResults(searchRequest);
}
}