com.larksuite.oapi.core.api.Api Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of larksuite-oapi Show documentation
Show all versions of larksuite-oapi Show documentation
Larksuite open platform facilitates the integration of enterprise applications and larksuite, making
collaboration and management more efficient
package com.larksuite.oapi.core.api;
import com.larksuite.oapi.core.Config;
import com.larksuite.oapi.core.Context;
import com.larksuite.oapi.core.api.handler.Handler;
import com.larksuite.oapi.core.api.request.Request;
import com.larksuite.oapi.core.api.response.Response;
public class Api {
public static Response send(Config config, Request request) throws Exception {
Context context = new Context();
config.withContext(context);
request.withContext(context);
Handler.DEFAULT.handle(context, request);
return request.getResponse();
}
}