mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
fixed warnings
This commit is contained in:
@@ -5,7 +5,6 @@ public class CanvasService
|
||||
{
|
||||
private const string BaseUrl = "https://snow.instructure.com/api/v1/";
|
||||
private readonly IWebRequestor webRequestor;
|
||||
private RestClient client;
|
||||
private string courseid { get; }
|
||||
public CanvasService(IWebRequestor webRequestor)
|
||||
{
|
||||
|
||||
@@ -6,13 +6,12 @@ public class WebRequestor : IWebRequestor
|
||||
private string token;
|
||||
private RestClient client;
|
||||
private string courseid { get; }
|
||||
public WebRequestor(RestClient client)
|
||||
public WebRequestor()
|
||||
{
|
||||
// token = Environment.GetEnvironmentVariable("CANVAS_TOKEN");
|
||||
// client = new RestClient(BaseUrl);
|
||||
// client.AddDefaultHeader("Authorization", $"Bearer {token}");
|
||||
token = Environment.GetEnvironmentVariable("CANVAS_TOKEN") ?? throw new Exception("CANVAS_TOKEN not in environment");
|
||||
client = new RestClient(BaseUrl);
|
||||
client.AddDefaultHeader("Authorization", $"Bearer {token}");
|
||||
|
||||
this.client = client;
|
||||
courseid = "774898";
|
||||
}
|
||||
public async Task<RestResponse<T[]>> GetManyAsync<T>(RestRequest request)
|
||||
|
||||
Reference in New Issue
Block a user