Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit 2b94e25

Browse files
committed
Release 1.0.0
1 parent 2b6497b commit 2b94e25

1 file changed

Lines changed: 47 additions & 4 deletions

File tree

README.md

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# consumable-code-pixabay-api By AmirIsBack
22
- v1.0.0 - Development
3-
- Release Soon
3+
- Stable Version
44

55
# About This Project
66
Eliminates the method of retrieving json data using retrofit repeatedly. so this project has a set of functions to retrieve data without the need for fetching data using the retrofit of the API
@@ -18,6 +18,14 @@ Simple code and reusable data
1818
https://pixabay.com/api/docs/
1919

2020
# Function Main From This Project
21+
// Switch For Using Chuck Interceptor
22+
fun usingChuckInterceptor(context: Context)
23+
24+
// Search for Image
25+
fun searchImage(query: String, callback: PixabayResultCallback<ResponseImage>)
26+
27+
// Search for Video
28+
fun searchVideo(query: String, callback: PixabayResultCallback<ResponseVideo>)
2129

2230
# Android Library Version (build.gradle)
2331
- ext.kotlin_version = '1.3.70'
@@ -29,14 +37,49 @@ https://pixabay.com/api/docs/
2937
# Version Release
3038
This Is Latest Release
3139

32-
$version_release = Still on development
40+
$version_release = 1.0.0
3341

3442
What's New??
3543

36-
* Development *
44+
* New Release searchImage() and searchVideo() *
3745

3846
# How To Use This Project
39-
- Release soon
47+
<h3>Step 1. Add the JitPack repository to your build file</h3>
48+
49+
Add it in your root build.gradle at the end of repositories:
50+
51+
allprojects {
52+
repositories {
53+
...
54+
maven { url 'https://jitpack.io' }
55+
}
56+
}
57+
58+
59+
<h3>Step 2. Add the dependency</h3>
60+
61+
dependencies {
62+
// library consumable code pixabay api
63+
implementation 'com.github.amirisback:consumable-code-pixabay-api:$version_release'
64+
}
65+
66+
<h3>Step 3. Declaration ConsumeTheSportDbApi</h3>
67+
68+
val query = "One Piece"
69+
val consumePixabayApi = ConsumePixabayApi(PixabayConstant.SAMPLE_API_KEY)
70+
consumePixabayApi.usingChuckInterceptor(this)
71+
consumePixabayApi.searchImage(query, object : PixabayResultCallback<ResponseImage>{
72+
override fun getResultData(data: ResponseImage) {
73+
74+
// * PLACE YOUR CODE HERE FOR UI / ARRAYLIST
75+
76+
}
77+
78+
override fun failedResult(statusCode: Int, errorMessage: String?) {
79+
}
80+
})
81+
82+
4083

4184
# Colaborator
4285
Very open to anyone, I'll write your name under this, please contribute by sending an email to me

0 commit comments

Comments
 (0)