Added return types to builders functions
This commit is contained in:
parent
f41c988699
commit
9e255373c9
2 changed files with 13 additions and 13 deletions
|
@ -71,28 +71,28 @@ class CreateConfig private constructor(builder: Builder) {
|
|||
/**
|
||||
* A branded short domain or `bit.ly` by default.
|
||||
*/
|
||||
fun domain(domain: String) = apply { this.domain = domain }
|
||||
fun domain(domain: String): Builder = apply { this.domain = domain }
|
||||
|
||||
/**
|
||||
* Always include a specific group and custom domain in your shorten calls.
|
||||
*/
|
||||
fun groupGuid(group_guid: String) = apply { this.group_guid = group_guid }
|
||||
fun groupGuid(group_guid: String): Builder = apply { this.group_guid = group_guid }
|
||||
|
||||
fun title(title: String) = apply { this.title = title }
|
||||
fun title(title: String): Builder = apply { this.title = title }
|
||||
|
||||
fun tags(tags: Array<String>) = apply { this.tags = tags }
|
||||
fun tags(tags: Array<String>): Builder = apply { this.tags = tags }
|
||||
|
||||
fun deeplinks(deeplinks: Array<Map<String, String>>) = apply { this.deeplinks = deeplinks }
|
||||
fun deeplinks(deeplinks: Array<Map<String, String>>): Builder = apply { this.deeplinks = deeplinks }
|
||||
|
||||
/**
|
||||
* The long URL.
|
||||
*/
|
||||
fun longUrl(long_url: String) = apply { this.long_url = long_url }
|
||||
fun longUrl(long_url: String): Builder = apply { this.long_url = long_url }
|
||||
|
||||
/**
|
||||
* Returns the full JSON response if `true`.
|
||||
*/
|
||||
fun toJson(toJson: Boolean) = apply { this.toJson = toJson }
|
||||
fun toJson(toJson: Boolean): Builder = apply { this.toJson = toJson }
|
||||
|
||||
/**
|
||||
* Builds the configuration.
|
||||
|
|
|
@ -68,17 +68,17 @@ class UpdateConfig private constructor(builder: Builder) {
|
|||
/**
|
||||
* A Bitlink made of the domain and hash.
|
||||
*/
|
||||
fun bitlink(bitlink: String) = apply { this.bitlink = bitlink }
|
||||
fun bitlink(bitlink: String): Builder = apply { this.bitlink = bitlink }
|
||||
|
||||
fun title(title: String) = apply { this.title = title }
|
||||
fun archived(archived: Boolean) = apply { this.archived = archived }
|
||||
fun tags(tags: Array<String>) = apply { this.tags = tags }
|
||||
fun deepLinks(deepLinks: Array<Map<String, String>>) = apply { this.deeplinks = deepLinks }
|
||||
fun title(title: String): Builder = apply { this.title = title }
|
||||
fun archived(archived: Boolean): Builder = apply { this.archived = archived }
|
||||
fun tags(tags: Array<String>): Builder = apply { this.tags = tags }
|
||||
fun deepLinks(deepLinks: Array<Map<String, String>>): Builder = apply { this.deeplinks = deepLinks }
|
||||
|
||||
/**
|
||||
* Returns the full JSON response if `true`.
|
||||
*/
|
||||
fun toJson(toJson: Boolean) = apply { this.toJson = toJson }
|
||||
fun toJson(toJson: Boolean): Builder = apply { this.toJson = toJson }
|
||||
|
||||
/**
|
||||
* Builds the configuration.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue