EventSearch
Extends:
RequestHandler → EventSearch
Ingresse Event's Search API
API to search for events.
Example:
var sdk = require('ingresse-sdk');
var ingresse = new Sdk();
// You will have access to this API
// after instantiate the SDK.
var search = ingresse.eventSearch;
Constructor Summary
Public Constructor | ||
public |
constructor(custom: object) Event Search |
Member Summary
Public Members | ||
public |
settings: * |
Method Summary
Public Methods | ||
public |
Search Events in a Company |
|
public |
searchByTerm(term: string, query: object, companyId: number): Promise Search Events by Term |
Inherited Summary
From class RequestHandler | ||
public |
auth: * |
|
public |
settings: * |
|
public |
Delete resource |
|
public |
Get resource |
|
public |
Post resource |
|
public |
Put resource |
|
public |
Create new request promise |
|
public |
Set Environment |
|
public |
Set API url |
|
public |
Upload files |
Public Constructors
public constructor(custom: object) source
Event Search
Override:
RequestHandler#constructorParams:
Name | Type | Attribute | Description |
custom | object |
|
Initialize Event Search settings. |
Public Members
Public Methods
public search(query: object, companyId: number): Promise source
Search Events in a Company
Example:
ingresse.eventSearch.search({
from : 'now-6h',
to : 'now+1d', // Only get events in a day range
state : 'rj',
orderBy : 'sessions.dateTime',
category: 'festas-e-baladas',
offset : 21,
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
public searchByTerm(term: string, query: object, companyId: number): Promise source
Search Events by Term
Example:
ingresse.eventSearch.searchByTerm('Event Name', {
size : 20,
from : 'now-6h',
orderBy: 'sessions.dateTime',
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});