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

Can it be used to create an new album and upload, happy to contribute! #34

Open
sahaine opened this issue Jul 23, 2020 · 4 comments
Open

Comments

@sahaine
Copy link

sahaine commented Jul 23, 2020

Hi, I want to use this to create albums and upload images to them from my photo processing app. I tried to create a new album but it does not seem to set URI correctly. If it can already do it great if not happy to code it up with some pointers :-)

        var newAbum = new AlbumEntity(s_oauthToken)
        {
            Description = "Steve",
            Name = "StevesTest",
            DownloadPassword = "StevesTest"
        };

        newAbum.SaveAsync().Wait();
@AlexGhiondea
Copy link
Owner

Do you get an error when you try to use it?

@sahaine
Copy link
Author

sahaine commented Jul 23, 2020

No it was a 200 response, but that's because url was incorrect (not initialized) Http acton was doing a PATCH rather than POST, I've hacked it about to make it work, In doing so have also found some of the enum types need to be passed as strings rather than int's also.

@sahaine
Copy link
Author

sahaine commented Jul 24, 2020

Also, your gen, like it :-), I did something similar for an ORM, I needed. We could extend this to handle [Obsolete] attributes where the property has been depreciated:

public const string PropertyDefintionsObsolete = @"[Obsolete(""Depreciation on '{0}'"")]";

            if (!string.IsNullOrWhiteSpace(prop.Deprecated))
            {
                propertyAccesors.AppendLine(string.Format(Constants.PropertyDefintionsObsolete, prop.Deprecated));
            }

@AlexGhiondea
Copy link
Owner

@sahaine thanks for the kind words on the generator! I had a lot of fun working on it a while back 🙂.
I did consider the Obsolete portion -- and maybe I'll add it in! The first thing would be to actually finish up the v2 version of it and make all the APIs work.

For the 200 response that you got back -- that is interesting -- I will try to investigate it. If you have any notes that you can share, please do 🙂.

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

2 participants