All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
edu.ksu.canvas.interfaces.CanvasMessenger Maven / Gradle / Ivy
package edu.ksu.canvas.interfaces;
import com.google.gson.JsonObject;
import edu.ksu.canvas.exception.InvalidOauthTokenException;
import edu.ksu.canvas.net.Response;
import edu.ksu.canvas.oauth.OauthToken;
import java.io.InputStream;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
public interface CanvasMessenger {
List getFromCanvas(OauthToken oauthToken, String url) throws InvalidOauthTokenException, IOException;
List getFromCanvas(OauthToken oauthToken, String url, Consumer consumer) throws InvalidOauthTokenException, IOException;
//TODO: Should probably make this parameter list more sane
Response sendToCanvas(OauthToken oauthToken, String url, Map> parameters) throws InvalidOauthTokenException, IOException;
Response sendFileToCanvas(OauthToken oauthToken, String url, Map> parameters, String fileParameter, String filePath, InputStream is) throws InvalidOauthTokenException, IOException;
Response sendJsonPostToCanvas(OauthToken oauthToken, String url, JsonObject requestBody) throws InvalidOauthTokenException, IOException;
Response sendJsonPutToCanvas(OauthToken oauthToken, String url, JsonObject requestBody) throws InvalidOauthTokenException, IOException;
Response deleteFromCanvas(OauthToken oauthToken, String url, Map> parameters) throws InvalidOauthTokenException, IOException;
Response getSingleResponseFromCanvas(OauthToken oauthToken, String url) throws InvalidOauthTokenException, IOException;
Response putToCanvas(OauthToken oauthToken, String url, Map> parameters) throws InvalidOauthTokenException, IOException;
String sendUpload(String uploadUrl, Map> params, InputStream in, String filename) throws IOException;
}