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
package imrankst1221.weatherapp.api.response_layer; | |
/** | |
* Created by imrankst1221@gmail.com | |
*/ | |
public class APIResponse { | |
private int responseCode; | |
public String getResponseMessage() { | |
return responseMessage; |
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
Privacy Policy | |
Vsioniptv built the Scary Place app as an Open Source app. This SERVICE is provided by Vsioniptv at no cost and is intended for use as is. | |
This page is used to inform website visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service. | |
If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy. | |
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Scary Place unless otherwise defined in this Privacy Policy. | |
Information Collection and Use |
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
Md. Imran Choudhury built the Chilis food park app as a Free app. This SERVICE is provided by Md. Imran Choudhury at no cost and is intended for use as is. | |
This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. | |
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. | |
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Chilis food park unless otherwise defined in this Privacy Policy. | |
Information Collection and Use |
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
Md. Imran Choudhury built the Medi Press app as a Free app. This SERVICE is provided by Md. Imran Choudhury at no cost and is intended for use as is. | |
This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. | |
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. | |
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Medi Press unless otherwise defined in this Privacy Policy. | |
Information Collection and Use |
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
object ApiWorker { | |
private var mClient: OkHttpClient? = null | |
private var mGsonConverter: GsonConverterFactory? = null | |
/** | |
* Don't forget to remove Interceptors (or change Logging Level to NONE) | |
* in production! Otherwise people will be able to see your request and response on Log Cat. | |
*/ | |
val client: OkHttpClient | |
@Throws(NoSuchAlgorithmException::class, KeyManagementException::class) |
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
data class LoginResponse( | |
@SerializedName("status") val status: Int = 0, | |
@SerializedName("error") val error: String = "", | |
@SerializedName("error_type") val errorType: String = "", | |
@Expose(deserialize = false) // deserialize is this filed is not required | |
@SerializedName("message") val message: String = "" | |
) |
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
interface UserApiService { | |
@Headers("Content-Type: application/json") | |
@GET("user") | |
fun getUser( | |
@Query("Authorization") authorizationKey: String, // authentication header | |
@Query("UserID") userID: String | |
) | |
} |
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
object ApiService { | |
private val TAG = "--ApiService" | |
fun loginApiCall() = Retrofit.Builder() | |
.baseUrl(Constants.API_BASE_PATH) | |
.addCallAdapterFactory(RxJava2CallAdapterFactory.create()) | |
.addConverterFactory(ApiWorker.gsonConverter) | |
.client(ApiWorker.client) | |
.build() | |
.create(LoginApiService::class.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
interface LoginApiService { | |
@Headers("Content-Type: application/json") | |
@POST("login") | |
fun doLogin( | |
//@Query("Authorization") authorizationKey: String, // authentication header | |
@Body loginPostData: LoginPostData): Observable<LoginResponse> // body data | |
} | |
data class LoginPostData( | |
@SerializedName("UserId") var userID: String, |
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
//https://github.com/google/gson | |
implementation 'com.google.code.gson:gson:2.8.5' | |
//https://github.com/square/okhttp | |
implementation 'com.squareup.okhttp3:okhttp:3.10.0' | |
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0' | |
// https://github.com/square/retrofit | |
implementation 'com.squareup.retrofit2:retrofit:2.3.0' | |
implementation 'com.squareup.retrofit2:converter-gson:2.3.0' | |
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0' | |
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0' |
OlderNewer