Skip to content

Commit 05473bc

Browse files
authored
Update readme
1 parent d6a77df commit 05473bc

File tree

1 file changed

+55
-37
lines changed

1 file changed

+55
-37
lines changed

README.md

Lines changed: 55 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11

22
# EasyInsta
3-
This is an android library through which you can use instagram programatically. You can say that this is a well optimize, will featured java wrapper of "Instagram graph API". You can direct messages, add stories, post photos, scrapping profiles and can do many more things with this library.
3+
An library through which you can use instagram programatically. You can say that this is a well optimize, will featured java wrapper of Instagram private API. You can send direct messages, add stories, post photos, scrap profiles and can do many more things with this library.
44

5-
![Banner](https://vinyl-state.com/wp-content/uploads/2020/12/instagram-logo2.jpg)
5+
Disclaimer ⚠: This API is private. Means that instagram has not documented or allowed others to use this API. If you are using this API then instagram can ban your account. **Developer will not be responsible for anything happend to your account**.
6+
7+
![Banner](https://i.ytimg.com/vi/jhTuFxpzevI/maxresdefault.jpg)
68

79
## Features
810

911
- Lightweight and Easy 2 use
1012
- No need api token
1113
- Supports **sending direct message** (Text & photos)
14+
- Supports **Login using proxy**
1215
- Supports **posting** (Only photo)
1316
- Supports **adding stories** (Only photo)
1417
- Supports **Following / Unfollowing others**
@@ -28,7 +31,7 @@ This is an android library through which you can use instagram programatically.
2831
In your app build.gradle
2932
```groovy
3033
dependencies {
31-
implementation 'com.github.ErrorxCode:EasyInsta:2.0'
34+
implementation 'com.github.ErrorxCode:EasyInsta:v2.0'
3235
}
3336
```
3437

@@ -43,7 +46,7 @@ dependencies {
4346
## API Reference
4447

4548
#### Create instagram object by logging in.
46-
```
49+
```java
4750
try {
4851
Instagram insta = new Instagram("username","password");
4952
} catch (IGLoginException e) {
@@ -59,7 +62,7 @@ try {
5962
```
6063

6164
#### Two factor login
62-
```
65+
```java
6366
Instagram instagram = Instagram.login2factor("username", "password", new Callable<String>() {
6467
@Override
6568
public String call() throws Exception {
@@ -81,7 +84,7 @@ login.setOnClickListener(new View.OnClickListener() {
8184

8285
Each method returns a `Task` representing the response of the request. The resoponse either contain a value or an exception
8386
depending upon success and failure. You can use the task in 2 ways. Ony way is,
84-
```
87+
```java
8588
task.addOnCompleteListener(new Task.OnCompletionListener<String>() {
8689
@Override
8790
public void onComplete(Task<String> task) {
@@ -93,8 +96,8 @@ task.addOnCompleteListener(new Task.OnCompletionListener<String>() {
9396
}
9497
});
9598
```
96-
another way is
97-
```
99+
another way is,
100+
```java
98101
task.addOnSuccessListener(new Task.OnSuccessListener<String>() {
99102
@Override
100103
public void onSuccess(String value) {
@@ -109,44 +112,64 @@ task.addOnSuccessListener(new Task.OnSuccessListener<String>() {
109112
```
110113

111114
#### Now let's post something...
112-
```
115+
```java
113116
Task<String> task = instagram.addStory(new File("story.png"));
114117
Task<String task = instagram.postPhoto(new File("post.png"),"This is caption");
115118
```
116119

117120
#### Send direct message
118-
```
119-
instagram.directMessage("x__coder__x","This is message...",null);
120-
instagram.directMessage("x__coder__x",new File("photo.jpg"),callback);
121+
```java
122+
Task<String> task = instagram.directMessage("x__coder__x","This is message...");
123+
Task<String> task = instagram.directMessage("x__coder__x",new File("photo.jpg"));
121124
```
122125

123126
#### Follow / Unfollow / remove someone
124-
```
125-
insta.follow("username2follow",callback);
126-
insta.unfollow("username2unfollow",callback);
127-
insta.removeFollower("username2remove",callback);
127+
```java
128+
instagram.follow("username2follow");
129+
instagram.unfollow("username2unfollow");
130+
instagram.removeFollower("username2remove");
128131

129132
```
130133

131134
#### Accept or ignore follow request
132-
```
133-
insta.accept("username2accept",null);
134-
insta.ignore("username2ignore",null);
135+
```java
136+
instagram.accept("username2accept");
137+
instagram.ignore("username2ignore");
135138
```
136139

137140
#### Get followings / followers / counts
138-
```
139-
List<String> followers = insta.getFollowers("username",callback);
140-
List<String> followings = insta.getFollowings("username",callback);
141-
int followersCount = insta.getFollowersCount("username",null);
142-
int followingCount = insta.getFollowingsCount("username",null);
143-
int postCount = insta.getPostCount("username",callback);
141+
```java
142+
Task<List<String>> followersTask = instagram.getFollowers("username");
143+
Task<List<String>> followingTask = instagram.getFollowings("username");
144+
Task<List<Integer>> followersCountTask = instagram.getFollowersCount("username");
145+
Task<List<Integer>> followingsCountTask = instagram.getFollowingsCount("username");
146+
Task<List<Integer>> postCountTask = instagram.getPostCount("username");
144147
```
145148

146149
#### Get profile metadata
147-
```
148-
String bio = insta.getBio("username",callback);
149-
String url = insta.getProfilePicUrl("username",callback);
150+
```java
151+
instagram.getBio("username").addOnCompleteListener(new Task.OnCompletionListener<String>() {
152+
@Override
153+
public void onComplete(Task<String> task) {
154+
String bio;
155+
if (task.isSuccessful())
156+
bio = task.getValue();
157+
else
158+
task.getException().printStackTrace();
159+
}
160+
});
161+
162+
instagram.getProfilePicUrl("username").addOnSuccessListener(new Task.OnSuccessListener<String>() {
163+
@Override
164+
public void onSuccess(String value) {
165+
String url = value;
166+
}
167+
}).addOnFailureListener(new Task.OnFailureListener() {
168+
@Override
169+
public void onFailed(Throwable exception) {
170+
exception.printStackTrace();
171+
}
172+
});
150173
```
151174
## Documentation
152175

@@ -157,21 +180,16 @@ String url = insta.getProfilePicUrl("username",callback);
157180

158181
#### [Q.1] Can we use this library to make bots ?
159182

160-
Answer. No. Instagram don't allow to make bots with the use of this APIs.
183+
Answer. No. Instagram don't allow to make bots with the use of APIs.
161184

162-
#### [Q.2] Can we use this to download stories or posts ?
185+
#### [Q.2] Can we download stories or posts using this API ?
163186

164-
Answer. Yes. But its not currently supported.
187+
Answer. No, Not currently. May be possible in future.
165188

166-
#### [Q.3] Does use of this library requires any tokens or other things ?
189+
#### [Q.3] Does use of this library requires any tokens or other keys ?
167190

168191
Answer. No. You only need to have username and password of the account.
169192

170-
#### [Q.4] Can we log in two-factor-authenticated accounts ?
171-
172-
Answer. Yes. Just pass a callback as thired argument while initializing the class.
173-
174-
175193

176194
## Contributing
177195

0 commit comments

Comments
 (0)