Automattic / Gravatar-SDK-iOS

Gravatar SDK is a Swift library that allows you to integrate Gravatar features into your own iOS applications.
https://gravatar.com
Mozilla Public License 2.0
52 stars 5 forks source link

Bring back `v1/upload-image` POST #491

Closed pinarol closed 1 month ago

pinarol commented 1 month ago

The v3 upload endpoint currently doesn't have the option to immediately set the uploaded avatar for a given email. Jetpack needs this. Let's bring back "https://api.gravatar.com/v1/upload-image" until we have this option. We can bring back the old signature for backward compatibility:

public func upload(_ image: UIImage, email: Email, accessToken: String) async throws -> URLResponse

so we'll have 2 different versions of this method, one for v3, one for v1 until v3 gives us the same functionality.

For reference, v1 was removed here: https://github.com/Automattic/Gravatar-SDK-iOS/pull/336