Skip to content

Commit

Permalink
2.211
Browse files Browse the repository at this point in the history
  • Loading branch information
WangDaYeeeeee committed Nov 24, 2018
1 parent 4935ebd commit 8ebf079
Show file tree
Hide file tree
Showing 39 changed files with 4,923 additions and 287 deletions.
8 changes: 5 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "wangdaye.com.geometricweather"
minSdkVersion 19
targetSdkVersion 28
versionCode 2115
versionName "2.115"
versionCode 2211
versionName "2.211"
}
buildTypes {
release {
Expand All @@ -31,6 +31,7 @@ android {
}
buildTypes.each {
it.buildConfigField 'String', 'CN_WEATHER_BASE_URL', CN_WEATHER_BASE_URL
it.buildConfigField 'String', 'CAIYUN_WEATHER_BASE_URL', CAIYUN_WEATHER_BASE_URL
it.buildConfigField 'String', 'ACCU_WEATHER_BASE_URL', ACCU_WEATHER_BASE_URL
it.buildConfigField 'String', 'ACCU_WEATHER_KEY', ACCU_WEATHER_KEY
it.buildConfigField 'String', 'ACCU_AQI_KEY', ACCU_AQI_KEY
Expand Down Expand Up @@ -60,7 +61,7 @@ allprojects {

apply plugin: 'org.greenrobot.greendao'
greendao {
schemaVersion 29
schemaVersion 35
generateTests false
}
dependencies {
Expand All @@ -79,6 +80,7 @@ dependencies {

implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'

implementation 'org.greenrobot:greendao:3.2.0'

Expand Down
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":2115,"versionName":"2.115","enabled":true,"outputFile":"GeometricWeather 2.115.apk","fullName":"release","baseName":"release"},"path":"GeometricWeather 2.115.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":2211,"versionName":"2.211","enabled":true,"outputFile":"GeometricWeather 2.211.apk","fullName":"release","baseName":"release"},"path":"GeometricWeather 2.211.apk","properties":{}}]
2 changes: 0 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
android:name=".ui.activity.MainActivity"
android:label="@string/app_name"
android:theme="@style/GeometricWeatherTheme"
android:clearTaskOnLaunch="true"
android:launchMode="singleTask"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Binary file not shown.
2,977 changes: 2,976 additions & 1 deletion app/src/main/assets/city_list.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package wangdaye.com.geometricweather.data.api;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
import wangdaye.com.geometricweather.data.entity.result.caiyun.CaiYunForecastResult;
import wangdaye.com.geometricweather.data.entity.result.caiyun.CaiYunMainlyResult;

public interface CaiYunApi {

@GET("wtr-v3/weather/all")
Call<CaiYunMainlyResult> getMainlyWeather(@Query("latitude") String latitude,
@Query("longitude") String longitude,
@Query("isLocated") boolean isLocated,
@Query("locationKey") String locationKey,
@Query("days") int days,
@Query("appKey") String appKey,
@Query("sign") String sign,
@Query("romVersion") String romVersion,
@Query("appVersion") String appVersion,
@Query("alpha") boolean alpha,
@Query("isGlobal") boolean isGlobal,
@Query("device") String device,
@Query("modDevice") String modDevice,
@Query("locale") String locale);

@GET("wtr-v3/weather/xm/forecast/minutely")
Call<CaiYunForecastResult> getForecastWeather(@Query("latitude") String latitude,
@Query("longitude") String longitude,
@Query("locale") String locale,
@Query("isGlobal") boolean isGlobal,
@Query("appKey") String appKey,
@Query("locationKey") String locationKey,
@Query("sign") String sign);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,41 @@
import wangdaye.com.geometricweather.data.entity.table.CNCityEntity;

/**
* CN city.
* CN city list.
* */

public class CNCityList {

public List<CNCity> citylist;
public List<CNCity> citys;

public static class CNCity {
/**
* name : 北京
* id : 101010100
* province_name : 北京
* id : 110101
* province : 北京市
* city : 东城区
* district : 无
* lat : 39.928353
* lon : 116.416357
* requestKey : 101011600
*/

public String name;
public String id;
public String province_name;
public String province;
public String city;
public String district;
public String lat;
public String lon;
public String requestKey;

public static CNCity buildCNCity(CNCityEntity entity) {
CNCity city = new CNCity();
city.name = entity.cityName;
city.id = entity.cityId;
city.province_name = entity.province;
city.id = String.valueOf(entity.id);
city.province = entity.province;
city.city = entity.city;
city.district = entity.district;
city.lat = entity.lat;
city.lon = entity.lon;
city.requestKey = entity.requestKey;
return city;
}
}
Expand Down
Loading

0 comments on commit 8ebf079

Please sign in to comment.