All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.sheigutn.pushbullet.http.defaults.post.UpdatePreferencesRequest Maven / Gradle / Ivy

The newest version!
package com.github.sheigutn.pushbullet.http.defaults.post;

import com.github.sheigutn.pushbullet.http.PostRequest;
import com.github.sheigutn.pushbullet.http.Urls;
import com.github.sheigutn.pushbullet.items.user.CurrentUser;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import lombok.Data;
import org.apache.http.client.methods.HttpPost;

@Data
public class UpdatePreferencesRequest extends PostRequest {

    private JsonObject preferences;

    public UpdatePreferencesRequest(JsonObject preferences) {
        super(Urls.CURRENT_USER);
        this.preferences = preferences;
    }

    @Override
    public void applyBody(Gson gson, HttpPost post) {
        setJsonBody(gson.toJson(this), post);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy