-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some optimisation and migrate to kotlin
- Loading branch information
1 parent
534bbb8
commit 507f983
Showing
57 changed files
with
1,088 additions
and
1,683 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package govind.iiitl.app | ||
|
||
import govind.iiitl.app.models.PostList | ||
import retrofit2.Call | ||
import retrofit2.Retrofit | ||
import retrofit2.converter.gson.GsonConverterFactory | ||
import retrofit2.http.GET | ||
|
||
internal object BloggerAPI { | ||
private const val key = "AIzaSyBpfJGq4L8xoKsue_jhXHtWLYlvwcMoREs" | ||
private const val url = "https://www.googleapis.com/blogger/v3/blogs/5429117628766351084/posts/" | ||
private var postService: PostService? = null | ||
@JvmStatic | ||
val service: PostService? | ||
get() { | ||
if (postService == null) { | ||
val retrofit = Retrofit.Builder() | ||
.baseUrl(url) | ||
.addConverterFactory(GsonConverterFactory.create()) | ||
.build() | ||
postService = retrofit.create(PostService::class.java) | ||
} | ||
return postService | ||
} | ||
|
||
interface PostService { | ||
@get:GET("?key=$key") | ||
val postList: Call<PostList?>? | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.