https://github.com/shmehdi01/android-restify
This is a web service used Volley and Gson to make your Service Request and Parsing in less time without any effort
https://github.com/shmehdi01/android-restify
android-library gson json-parser rest-api service volley volley-library
Last synced: about 8 hours ago
JSON representation
This is a web service used Volley and Gson to make your Service Request and Parsing in less time without any effort
- Host: GitHub
- URL: https://github.com/shmehdi01/android-restify
- Owner: shmehdi01
- Created: 2018-10-26T14:28:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-11T15:46:31.000Z (about 7 years ago)
- Last Synced: 2025-10-31T01:50:31.449Z (8 months ago)
- Topics: android-library, gson, json-parser, rest-api, service, volley, volley-library
- Language: Java
- Homepage:
- Size: 1.08 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This library will help you to parse easily without any more efforts.
Note : Make sure you have given INTERNET PERMISSION in manifest.xml
Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.shmehdi01:Android-Restify:v.1.0.3'
}
How to use ?
Suppose your JSON response us like that :
{
"facebook": "https://www.facebook.com/rizz.hacker",
"twitter": "https://twitter.com/shmehdi01",
"youtube": "https://www.youtube.com/shmehdi5",
}
Create a Model/Pojo Class as :
class Social {
private String facebook;
private String youtube;
private String twitter;
public String getFacebook() {
return facebook;
}
public void setFacebook(String facebook) {
this.facebook = facebook;
}
public String getYoutube() {
return youtube;
}
public void setYoutube(String youtube) {
this.youtube = youtube;
}
public String getTwitter() {
return twitter;
}
public void setTwitter(String twitter) {
this.twitter = twitter;
}
}
Hit request as :
new Service().getRequest(this, url, new Parser() {
@Override
protected TypeToken parseJson() {
return new TypeToken(){};
}
}, new Response() {
@Override
public void onServerResponse(Social social, String json, String url) {
}
});
More methods :
postRequest()
jsonReqeust()
parseResponse()
logError()