Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused type T in api.Upload<T>? #16

Open
jofford opened this issue Apr 10, 2018 · 0 comments
Open

Unused type T in api.Upload<T>? #16

jofford opened this issue Apr 10, 2018 · 0 comments

Comments

@jofford
Copy link

jofford commented Apr 10, 2018

It appears the api.Upload< T >(api, fileUpload, payload) method requires a type T that is never used? It seems to work fine with just < object > but wasn't sure what it expected.

        var api = PlanGridClient.Create(Properties.Settings.Default.ApiKey);

        var versionRequest = new UploadVersionRequest
        {
            NumberOfFiles = 1,
            VersionName = "MyVersion" 
        };

        var versionUpload = await api.UploadVersion(project_uid, versionRequest);

        foreach (var fileUploadRequest in versionUpload.FileUploadRequests)
        {
            var uploadFile = new UploadFile
            {
                FileName = filename
            };

            var fileUpload = await api.UploadFileToVersion(project_uid, versionUpload.Uid, fileUploadRequest.Uid, uploadFile);

            await api.Upload<object>(fileUpload, payload);  // what type is expected here???
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant