cuihp / ShortLinks

利用新浪API 生成短连接

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ShortLinks

Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://www.jitpack.io' }
		}
	}

Add the dependency

	dependencies {
    	        implementation 'com.github.cuihp:ShortLinks:1.0.1'
    	}

How to use

	  ShortLinkUtils.newIns().toTransformation("https://blog.csdn.net/jennyliliyang/article/", new ShortLinkUtils.CallBack() {
                 @Override
                 public void onResult(RespResult respResult) {
                     Toast.makeText(MainActivity.this, respResult.getUrl_short(), Toast.LENGTH_SHORT).show();
                 }
     
                 @Override
                 public void onError() {
     
                 }
             });

About

利用新浪API 生成短连接


Languages

Language:Java 100.0%