Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
package com.douban.models
import java.awt.Desktop
import java.net.URI
import com.douban.common._
/**
* Copyright by <a href="http://www.josephjctang.com"><em><i>Joseph J.C. Tang</i></em></a> <br/>
* Email: <a href="mailto:jinntrance@gmail.com">jinntrance@gmail.com</a>
* @author joseph
* @since 12/26/12 10:37 PM
* @version 1.0
*/
class AuthTest extends BaseTest {
test("the auth url") {
val url=new URI(Auth.getAuthUrl(Auth.api_key, Auth.redirect_url))
println(url)
Desktop.getDesktop.browse(url)
// val codeUrl = readLine("please copy the url here after authorization>\n")
// Auth.code = Auth.extractCode(codeUrl)
}
test("the acess token url") {
prettyJSON(Auth.getTokenByCode("3f5bd2951eb79e98", api_key, secret))
}
test("the refresh token url") {
val t = Auth.getTokenByFresh(refresh_token, api_key, secret)
prettyJSON(t)
}
}