Skip to content

Commit 20ba905

Browse files
authored
Create README.md
1 parent a3db1d9 commit 20ba905

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Java Link Parser
2+
### Here is our implimentation of Link Preview written in Java with RxJava2
3+
## Usage
4+
Initialize LinkCrawler
5+
```java
6+
LinkCrawler crawler = new LinkCrawler();
7+
```
8+
If you need to do somthing before parsing url, you can implement PreloadCallback
9+
```java
10+
public class MainActivity extends AppCompatActivity implements OnPreloadCallback
11+
12+
crawler.setPreloadCallback(this);
13+
```
14+
To start parsing you need to use crawler.parseUrl and pass desired url, it returs ```Flowable<Result>```
15+
```java
16+
crawler.parseUrl("https://github.com/")
17+
.subscribe(new Consumer<Result>() {
18+
@Override
19+
public void accept(@NonNull Result result) throws Exception {
20+
mainBinding.setContent(result.getmParseContent());
21+
}
22+
});
23+
```
24+
Result object contains ParseContent field wich contains all parsed data of passed url, such as title,description etc.
25+
#### [Kotlin version](https://github.com/VRGsoftUA/Kotlin-Link-Parser)
26+
License
27+
=================================
28+
29+
Copyright 2016 VRG Soft
30+
31+
Licensed under the Apache License, Version 2.0 (the "License");
32+
you may not use this file except in compliance with the License.
33+
You may obtain a copy of the License at
34+
35+
http://www.apache.org/licenses/LICENSE-2.0
36+
37+
Unless required by applicable law or agreed to in writing, software
38+
distributed under the License is distributed on an "AS IS" BASIS,
39+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
40+
See the License for the specific language governing permissions and
41+
limitations under the License.

0 commit comments

Comments
 (0)