📝 OO connector technical documentation (#547)
This commit is contained in:
committed by
ericlinagora
parent
5e1ac7b010
commit
6534f23cc2
@@ -7,6 +7,8 @@ import {
|
||||
import axios, { Axios, AxiosRequestConfig, AxiosResponse } from 'axios';
|
||||
import { CREDENTIALS_ENDPOINT, CREDENTIALS_ID, CREDENTIALS_SECRET, ONLY_OFFICE_SERVER } from '@config';
|
||||
import loggerService from './logger.service';
|
||||
|
||||
/** Client for the Twake Drive backend API on behalf of the plugin (or provided token in parameters) */
|
||||
class ApiService implements IApiService {
|
||||
private axios: Axios;
|
||||
private initialized: Promise<string>;
|
||||
@@ -20,7 +22,7 @@ class ApiService implements IApiService {
|
||||
setInterval(() => {
|
||||
this.initialized = this.refreshToken();
|
||||
loggerService.info('Refreshing token 🪙');
|
||||
}, 1000 * 60); //Every 10 minutes
|
||||
}, 1000 * 60); //TODO: should be Every 10 minutes
|
||||
}
|
||||
|
||||
public get = async <T>(params: IApiServiceRequestParams<T>): Promise<T> => {
|
||||
|
||||
@@ -2,6 +2,7 @@ import { DriveFileType, IDriveService } from '@/interfaces/drive.interface';
|
||||
import apiService from './api.service';
|
||||
import loggerService from './logger.service';
|
||||
|
||||
/** Client for the Twake Drive backend API dealing with `DriveItem`s */
|
||||
class DriveService implements IDriveService {
|
||||
public get = async (params: { company_id: string; drive_file_id: string; user_token?: string }): Promise<DriveFileType> => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user