This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
forked from mastodon/mastodon-android
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
169 additions
and
29 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
mastodon/src/main/java/org/joinmastodon/android/api/requests/accounts/GetAccountLists.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.joinmastodon.android.api.requests.accounts; | ||
|
||
import com.google.gson.reflect.TypeToken; | ||
|
||
import org.joinmastodon.android.api.MastodonAPIRequest; | ||
import org.joinmastodon.android.model.FollowList; | ||
|
||
import java.util.List; | ||
|
||
public class GetAccountLists extends MastodonAPIRequest<List<FollowList>>{ | ||
public GetAccountLists(String id){ | ||
super(HttpMethod.GET, "/accounts/"+id+"/lists", new TypeToken<>(){}); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
mastodon/src/main/java/org/joinmastodon/android/api/requests/accounts/SearchAccounts.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.joinmastodon.android.api.requests.accounts; | ||
|
||
import com.google.gson.reflect.TypeToken; | ||
|
||
import org.joinmastodon.android.api.MastodonAPIRequest; | ||
import org.joinmastodon.android.model.Account; | ||
|
||
import java.util.List; | ||
|
||
public class SearchAccounts extends MastodonAPIRequest<List<Account>>{ | ||
public SearchAccounts(String q, int limit, int offset, boolean resolve, boolean following){ | ||
super(HttpMethod.GET, "/accounts/search", new TypeToken<>(){}); | ||
addQueryParameter("q", q); | ||
if(limit>0) | ||
addQueryParameter("limit", limit+""); | ||
if(offset>0) | ||
addQueryParameter("offset", offset+""); | ||
if(resolve) | ||
addQueryParameter("resolve", "true"); | ||
if(following) | ||
addQueryParameter("following", "true"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
mastodon/src/main/java/org/joinmastodon/android/events/AccountAddedToListEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.joinmastodon.android.events; | ||
|
||
import org.joinmastodon.android.model.Account; | ||
|
||
public class AccountAddedToListEvent{ | ||
public final String accountID; | ||
public final String listID; | ||
public final Account account; | ||
|
||
public AccountAddedToListEvent(String accountID, String listID, Account account){ | ||
this.accountID=accountID; | ||
this.listID=listID; | ||
this.account=account; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
mastodon/src/main/java/org/joinmastodon/android/events/AccountRemovedFromListEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.joinmastodon.android.events; | ||
|
||
public class AccountRemovedFromListEvent{ | ||
public final String accountID; | ||
public final String listID; | ||
public final String targetAccountID; | ||
|
||
public AccountRemovedFromListEvent(String accountID, String listID, String targetAccountID){ | ||
this.accountID=accountID; | ||
this.listID=listID; | ||
this.targetAccountID=targetAccountID; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
mastodon/src/main/java/org/joinmastodon/android/events/FinishListCreationFragmentEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.joinmastodon.android.events; | ||
|
||
public class FinishListCreationFragmentEvent{ | ||
public final String accountID; | ||
public final String listID; | ||
|
||
public FinishListCreationFragmentEvent(String accountID, String listID){ | ||
this.accountID=accountID; | ||
this.listID=listID; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
mastodon/src/main/java/org/joinmastodon/android/events/ListCreatedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.joinmastodon.android.events; | ||
|
||
import org.joinmastodon.android.model.FollowList; | ||
|
||
public class ListCreatedEvent{ | ||
public final String accountID; | ||
public final FollowList list; | ||
|
||
public ListCreatedEvent(String accountID, FollowList list){ | ||
this.accountID=accountID; | ||
this.list=list; | ||
} | ||
} |
10 changes: 6 additions & 4 deletions
10
mastodon/src/main/java/org/joinmastodon/android/events/ListDeletedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package org.joinmastodon.android.events; | ||
|
||
public class ListDeletedEvent { | ||
public final String id; | ||
public class ListDeletedEvent{ | ||
public final String accountID; | ||
public final String listID; | ||
|
||
public ListDeletedEvent(String id) { | ||
this.id = id; | ||
public ListDeletedEvent(String accountID, String listID){ | ||
this.accountID=accountID; | ||
this.listID=listID; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
mastodon/src/main/java/org/joinmastodon/android/events/ListUpdatedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.joinmastodon.android.events; | ||
|
||
import org.joinmastodon.android.model.FollowList; | ||
|
||
public class ListUpdatedEvent{ | ||
public final String accountID; | ||
public final FollowList list; | ||
|
||
public ListUpdatedEvent(String accountID, FollowList list){ | ||
this.accountID=accountID; | ||
this.list=list; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters