MastodonApi: add support for subscribing endpoints and subscribing status field
This commit is contained in:
parent
b414d891ad
commit
1d79902bdc
@ -24,5 +24,6 @@ data class Relationship (
|
||||
val blocking: Boolean,
|
||||
val muting: Boolean,
|
||||
val requested: Boolean,
|
||||
@SerializedName("showing_reblogs") val showingReblogs: Boolean
|
||||
@SerializedName("showing_reblogs") val showingReblogs: Boolean,
|
||||
val subscribing: Boolean? = null // Pleroma extension
|
||||
)
|
||||
|
@ -326,6 +326,16 @@ interface MastodonApi {
|
||||
@Path("id") accountId: String
|
||||
): Call<List<IdentityProof>>
|
||||
|
||||
@POST("api/v1/pleroma/accounts/{id}/subscribe")
|
||||
fun subscribeAccount(
|
||||
@Path("id") accountId: String
|
||||
): Call<Relationship>
|
||||
|
||||
@POST("api/v1/pleroma/accounts/{id}/unsubscribe")
|
||||
fun unsubscribeAccount(
|
||||
@Path("id") accountId: String
|
||||
): Call<Relationship>
|
||||
|
||||
@GET("api/v1/blocks")
|
||||
fun blocks(
|
||||
@Query("max_id") maxId: String?
|
||||
@ -499,6 +509,16 @@ interface MastodonApi {
|
||||
@Path("id") accountId: String
|
||||
): Single<Relationship>
|
||||
|
||||
@POST("api/v1/pleroma/accounts/{id}/subscribe")
|
||||
fun subscribeAccountObservable(
|
||||
@Path("id") accountId: String
|
||||
): Single<Relationship>
|
||||
|
||||
@POST("api/v1/pleroma/accounts/{id}/unsubscribe")
|
||||
fun unsubscribeAccountObservable(
|
||||
@Path("id") accountId: String
|
||||
): Single<Relationship>
|
||||
|
||||
@GET("api/v1/accounts/relationships")
|
||||
fun relationshipsObservable(
|
||||
@Query("id[]") accountIds: List<String>
|
||||
|
Loading…
Reference in New Issue
Block a user