Some updates

This commit is contained in:
Thomas 2020-09-03 18:56:28 +02:00
parent 4c51a7c7e8
commit 6d66b2f08b
3 changed files with 30 additions and 3 deletions

View File

@ -40,8 +40,8 @@ allprojects {
dependencies { dependencies {
implementation "androidx.multidex:multidex:2.0.1" implementation "androidx.multidex:multidex:2.0.1"
implementation fileTree(dir: "libs", include: ["*.jar"]) implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.1.0' implementation 'com.google.android.material:material:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0' implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.navigation:navigation-fragment:2.3.0' implementation 'androidx.navigation:navigation-fragment:2.3.0'

View File

@ -1167,6 +1167,33 @@ public class PeertubeAPI {
} }
} }
/**
* Retrieves subscription videos *synchronously*
*
* @param max_id String id max
* @return APIResponse
*/
public APIResponse getSubscriptionUsers(String max_id) {
List<Account> accounts = new ArrayList<>();
try {
HttpsConnection httpsConnection = new HttpsConnection(context);
HashMap<String, String> params = new HashMap<>();
if (max_id != null)
params.put("start", max_id);
params.put("sort", "-createdAt");
String response = httpsConnection.get("/users/me/subscriptions", 60, params, null);
JSONArray jsonArray = new JSONObject(response).getJSONArray("data");
accounts = parseAccountResponsePeertube(jsonArray);
} catch (HttpsConnection.HttpsConnectionException e) {
setError(e.getStatusCode(), e);
} catch (NoSuchAlgorithmException | IOException | KeyManagementException | JSONException e) {
e.printStackTrace();
}
apiResponse.setAccounts(accounts);
return apiResponse;
}
/** /**
* Retrieves overview videos *synchronously* * Retrieves overview videos *synchronously*
* *

View File

@ -5,7 +5,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath "com.android.tools.build:gradle:4.0.0" classpath 'com.android.tools.build:gradle:4.0.1'
def nav_version = "2.3.0" def nav_version = "2.3.0"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong