com.github.sheigutn.pushbullet.http.defaults.post.UpdatePreferencesRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pushbullet-java-8 Show documentation
Show all versions of pushbullet-java-8 Show documentation
Pushbullet Library for Java 8
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