/
oauth-sources.service.ts
30 lines (27 loc) · 1.07 KB
/
oauth-sources.service.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { HashMap } from '../../../utilities/types.utilities';
import { EngineHttpClient } from '../../http.service';
import { EngineAuthSourceQueryOptions } from '../auth-sources/auth-source.interfaces';
import { EngineResourceService } from '../resources/resources.service';
import { EngineOAuthSource } from './oauth-source.class';
export class EngineOAuthSourcesService extends EngineResourceService<EngineOAuthSource> {
/* istanbul ignore next */
constructor(protected http: EngineHttpClient) {
super(http);
this._name = 'OAuth Authentication Source';
this._api_route = 'oauth_auths';
}
/**
* Query the index of the API route associated with this service
* @param query_params Map of query paramaters to add to the request URL
*/
public query(query_params?: EngineAuthSourceQueryOptions) {
return super.query(query_params);
}
/**
* Convert API data into local interface
* @param item Raw API data
*/
protected process(item: HashMap) {
return new EngineOAuthSource(this, item);
}
}