public class RestCanvasMessenger extends Object implements CanvasMessenger
| Constructor and Description |
|---|
RestCanvasMessenger(int connectTimeout,
int readTimeout,
RestClient restClient) |
public RestCanvasMessenger(int connectTimeout,
int readTimeout,
RestClient restClient)
public List<Response> getFromCanvas(@NotNull OauthToken oauthToken, @NotNull String url) throws InvalidOauthTokenException, IOException
getFromCanvas in interface CanvasMessengerInvalidOauthTokenExceptionIOExceptionpublic List<Response> getFromCanvas(@NotNull OauthToken oauthToken, @NotNull String url, Consumer<Response> callback) throws InvalidOauthTokenException, IOException
getFromCanvas in interface CanvasMessengerInvalidOauthTokenExceptionIOExceptionpublic Response sendToCanvas(@NotNull OauthToken oauthToken, @NotNull String url, @NotNull Map<String,List<String>> parameters) throws InvalidOauthTokenException, IOException
sendToCanvas in interface CanvasMessengerInvalidOauthTokenExceptionIOExceptionpublic Response sendFileToCanvas(@NotNull OauthToken oauthToken, @NotNull String url, @NotNull Map<String,List<String>> parameters, String fileParameter, String filePath, InputStream is) throws InvalidOauthTokenException, IOException
sendFileToCanvas in interface CanvasMessengerInvalidOauthTokenExceptionIOExceptionpublic Response sendJsonPostToCanvas(OauthToken oauthToken, String url, com.google.gson.JsonObject requestBody) throws InvalidOauthTokenException, IOException
sendJsonPostToCanvas in interface CanvasMessengerInvalidOauthTokenExceptionIOExceptionpublic Response sendJsonPutToCanvas(OauthToken oauthToken, String url, com.google.gson.JsonObject requestBody) throws InvalidOauthTokenException, IOException
sendJsonPutToCanvas in interface CanvasMessengerInvalidOauthTokenExceptionIOExceptionpublic Response deleteFromCanvas(@NotNull OauthToken oauthToken, @NotNull String url, @NotNull Map<String,List<String>> parameters) throws InvalidOauthTokenException, IOException
deleteFromCanvas in interface CanvasMessengerInvalidOauthTokenExceptionIOExceptionpublic Response putToCanvas(@NotNull OauthToken oauthToken, @NotNull String url, @NotNull Map<String,List<String>> parameters) throws InvalidOauthTokenException, IOException
putToCanvas in interface CanvasMessengerInvalidOauthTokenExceptionIOExceptionpublic Response getSingleResponseFromCanvas(@NotNull OauthToken oauthToken, @NotNull String url) throws InvalidOauthTokenException, IOException
getSingleResponseFromCanvas in interface CanvasMessengerInvalidOauthTokenExceptionIOExceptionpublic String sendUpload(String uploadUrl, Map<String,List<String>> params, InputStream in, String filename) throws IOException
sendUpload in interface CanvasMessengerIOExceptionCopyright © 2021 Kansas State University, Office of Mediated Education. All rights reserved.