Skip to content

Commit

Permalink
fix: collection api.
Browse files Browse the repository at this point in the history
  • Loading branch information
chivehao committed Jul 14, 2024
1 parent db892d1 commit 28c5874
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 139 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,13 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: release-android-${{ github.ref_name }}
path: build/app/outputs/flutter-apk
path: build/app/outputs/flutter-apk

- name: Tar apk file
run: tar -cvf ikaros-v${{ github.ref_name }}.tar build/app/outputs/flutter-apk
- name: Init LanZouCloud-CMD
run: |
git clone https://github.com/zaxtyson/LanZouCloud-CMD.git && cd LanZouCloud-CMD && python3 -m pip install -r requirements.txt && python3 main.py
- name: Publish ZIP LanZouCloud
run: |
login ${{ secrets.LANZOUCLOUD_COOKIE }} && cd Ikaros/App/ipa && upload ikaros-v${{ github.ref_name }}.tar && logout && bye
11 changes: 10 additions & 1 deletion .github/workflows/ios-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,13 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: release-ios-${{ github.ref_name }}
path: output
path: output

- name: Rename ipa file
run: mv output/ikaros.ipa ikaros-v${{ github.ref_name }}.ipa
- name: Init LanZouCloud-CMD
run: |
git clone https://github.com/zaxtyson/LanZouCloud-CMD.git && cd LanZouCloud-CMD && python3 -m pip install -r requirements.txt && python3 main.py
- name: Publish IPA LanZouCloud
run: |
login ${{ secrets.LANZOUCLOUD_COOKIE }} && cd Ikaros/App/ipa && upload ikaros-v${{ github.ref_name }}.ipa && logout && bye
5 changes: 2 additions & 3 deletions lib/api/collection/EpisodeCollectionApi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ class EpisodeCollectionApi {

String baseUrl = authParams.baseUrl;
String basicAuth = authParams.basicAuth;
String userId = authParams.userId;
String apiUrl =
"$baseUrl/api/v1alpha1/episode/collection/$userId/$episodeId";
"$baseUrl/api/v1alpha1/collection/episode/$episodeId";

try {
BaseOptions options = BaseOptions();
Expand Down Expand Up @@ -57,7 +56,7 @@ class EpisodeCollectionApi {
String basicAuth = authParams.basicAuth;
String userId = authParams.userId;
String apiUrl =
"$baseUrl/api/v1alpha1/episode/collection/$userId/$episodeId";
"$baseUrl/api/v1alpha1/collection/episode/$episodeId";

final queryParams = {
'progress': seek.inMilliseconds,
Expand Down
13 changes: 6 additions & 7 deletions lib/api/collection/SubjectCollectionApi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SubjectCollectionApi {
String baseUrl = authParams.baseUrl;
String basicAuth = authParams.basicAuth;
String userId = authParams.userId;
String apiUrl = "$baseUrl/api/v1alpha1/subject/collections/$userId"
String apiUrl = "$baseUrl/api/v1alpha1/collection/subjects"
"?page=$page&size=$size";
if (type != null) {
apiUrl = "${apiUrl}&type=${type.name}";
Expand Down Expand Up @@ -67,7 +67,7 @@ class SubjectCollectionApi {
String baseUrl = authParams.baseUrl;
String basicAuth = authParams.basicAuth;
String userId = authParams.userId;
String apiUrl = "$baseUrl/api/v1alpha1/subject/collection/$userId/$subjectId";
String apiUrl = "$baseUrl/api/v1alpha1/collection/subject/$subjectId";

try {
BaseOptions options = BaseOptions();
Expand Down Expand Up @@ -97,8 +97,8 @@ class SubjectCollectionApi {
String baseUrl = authParams.baseUrl;
String basicAuth = authParams.basicAuth;
String userId = authParams.userId;
String apiUrl = "$baseUrl/api/v1alpha1/subject/collection/collect"
"?userId=$userId&subjectId=$subjectId&type=${type.name}";
String apiUrl = "$baseUrl/api/v1alpha1/collection/subject/collect"
"?subjectId=$subjectId&type=${type.name}";

if(isPrivate != null) {
apiUrl = "$apiUrl&isPrivate=$isPrivate";
Expand Down Expand Up @@ -131,9 +131,8 @@ class SubjectCollectionApi {

String baseUrl = authParams.baseUrl;
String basicAuth = authParams.basicAuth;
String userId = authParams.userId;
String apiUrl = "$baseUrl/api/v1alpha1/subject/collection/collect"
"?userId=$userId&subjectId=$subjectId";
String apiUrl = "$baseUrl/api/v1alpha1/collection/subject/collect"
"?subjectId=$subjectId";

try {
BaseOptions options = BaseOptions();
Expand Down
Loading

0 comments on commit 28c5874

Please sign in to comment.